aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2013-12-06 14:16:51 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-15 15:28:46 -0800
commitbfc2ba016161cc523ed6ea9262651b34070b8fff (patch)
treef3341e1e1213f3a9ca763581347b1a98d9edf3bf /drivers/net
parente1cef3c9843709fd913021679c3bf711c8301627 (diff)
downloadlinaro-lsk-bfc2ba016161cc523ed6ea9262651b34070b8fff.tar.gz
tun: update file current position
[ Upstream commit d0b7da8afa079ffe018ab3e92879b7138977fc8f ] Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-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 9ef85fea1d1..582497103fe 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1412,6 +1412,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;