Thread (64 messages) 64 messages, 3 authors, 2014-01-14
STALE4556d

[PATCH 3.10 09/62] macvtap: update file current position

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2014-01-14 01:03:49
Also in: lkml

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Zhi Yong Wu <redacted>

[ Upstream commit e6ebc7f16ca1434a334647aa56399c546be4e64b ]

Signed-off-by: Zhi Yong Wu <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/macvtap.c |    2 ++
 1 file changed, 2 insertions(+)
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -903,6 +903,8 @@ static ssize_t macvtap_aio_read(struct k
 
 	ret = macvtap_do_read(q, iocb, iv, len, file->f_flags & O_NONBLOCK);
 	ret = min_t(ssize_t, ret, len); /* XXX copied from tun.c. Why? */
+	if (ret > 0)
+		iocb->ki_pos = ret;
 out:
 	return ret;
 }

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help