projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1cef3c
)
tun: update file current position
author
Zhi Yong Wu
<wuzhy@linux.vnet.ibm.com>
Fri, 6 Dec 2013 06:16:51 +0000
(14:16 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 15 Jan 2014 23:28:46 +0000
(15:28 -0800)
[ 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>
drivers/net/tun.c
patch
|
blob
|
history
diff --git
a/drivers/net/tun.c
b/drivers/net/tun.c
index 9ef85fea1d1ef6d035ca75050b5b85daa8247742..582497103fe88ee4b659f646107437a66e784a2f 100644
(file)
--- 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;