summaryrefslogtreecommitdiff
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2013-12-06 14:16:51 +0800
committerDavid S. Miller <davem@davemloft.net>2013-12-06 12:42:14 -0500
commitd0b7da8afa079ffe018ab3e92879b7138977fc8f (patch)
tree1964426353fce8cf7932835e622c8f794c1cfb5c /drivers/net/tun.c
parente6ebc7f16ca1434a334647aa56399c546be4e64b (diff)
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 'drivers/net/tun.c')
-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;