summaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2013-12-06 07:16:51 +0100
committerDavid S. Miller <davem@davemloft.net>2013-12-06 18:42:14 +0100
commitd0b7da8afa079ffe018ab3e92879b7138977fc8f (patch)
tree1964426353fce8cf7932835e622c8f794c1cfb5c /drivers/net/tun.c
parentmacvtap: update file current position (diff)
downloadlinux-d0b7da8afa079ffe018ab3e92879b7138977fc8f.tar.xz
linux-d0b7da8afa079ffe018ab3e92879b7138977fc8f.zip
tun: update file current position
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/tun.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 782e38bfc1ee..e26cbea1ce68 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1356,6 +1356,8 @@ static ssize_t tun_chr_aio_read(struct kiocb *iocb, const struct iovec *iv,
ret = tun_do_read(tun, tfile, 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;