From: Zhi Yong Wu Date: Fri, 6 Dec 2013 06:16:51 +0000 (+0800) Subject: tun: update file current position X-Git-Tag: v3.4.77~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=693d5d2765cdd89a9f8f113d6a7426ddfe996378;p=platform%2Fkernel%2Flinux-stable.git tun: update file current position [ Upstream commit d0b7da8afa079ffe018ab3e92879b7138977fc8f ] Signed-off-by: Zhi Yong Wu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 194f879..5b1a1b5 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -903,6 +903,8 @@ static ssize_t tun_chr_aio_read(struct kiocb *iocb, const struct iovec *iv, ret = tun_do_read(tun, iocb, iv, len, file->f_flags & O_NONBLOCK); ret = min_t(ssize_t, ret, len); + if (ret > 0) + iocb->ki_pos = ret; out: tun_put(tun); return ret;