diff options
author | Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> | 2013-12-06 14:16:51 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-15 15:27:10 -0800 |
commit | 693d5d2765cdd89a9f8f113d6a7426ddfe996378 (patch) | |
tree | 345f7c8e07c69509b469313d88194b8b26b8b483 /drivers | |
parent | d717ca464061e93f0e125e81ae16993da66094f2 (diff) |
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')
-rw-r--r-- | drivers/net/tun.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 194f8798b7e..5b1a1b51fdb 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; |