diff options
author | Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> | 2013-12-06 14:16:51 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-06 12:42:14 -0500 |
commit | d0b7da8afa079ffe018ab3e92879b7138977fc8f (patch) | |
tree | 1964426353fce8cf7932835e622c8f794c1cfb5c /drivers | |
parent | e6ebc7f16ca1434a334647aa56399c546be4e64b (diff) | |
download | linux-stable-d0b7da8afa079ffe018ab3e92879b7138977fc8f.tar.gz linux-stable-d0b7da8afa079ffe018ab3e92879b7138977fc8f.tar.bz2 linux-stable-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 '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 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; |