summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2013-12-06 14:16:50 +0800
committerDavid S. Miller <davem@davemloft.net>2013-12-06 12:42:14 -0500
commite6ebc7f16ca1434a334647aa56399c546be4e64b (patch)
treeefd351267b1d78e3fb8afd6380827078f1c45e7f /drivers/net
parent239c78db9c41a8f524cce60507440d72229d73bc (diff)
macvtap: 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/net')
-rw-r--r--drivers/net/macvtap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 9093004f9b63..957cc5c3653d 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -876,6 +876,8 @@ static ssize_t macvtap_aio_read(struct kiocb *iocb, const struct iovec *iv,
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;
}