commit | d0b7da8afa079ffe018ab3e92879b7138977fc8f | [log] [tgz] |
---|---|---|
author | Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> | Fri Dec 06 14:16:51 2013 +0800 |
committer | David S. Miller <davem@davemloft.net> | Fri Dec 06 12:42:14 2013 -0500 |
tree | 1964426353fce8cf7932835e622c8f794c1cfb5c | |
parent | e6ebc7f16ca1434a334647aa56399c546be4e64b [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>
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 782e38b..e26cbea 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c
@@ -1356,6 +1356,8 @@ 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;