aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2013-12-06 14:16:50 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-15 15:28:46 -0800
commite1cef3c9843709fd913021679c3bf711c8301627 (patch)
treeece8c743d0eeb8bf0e8a2ddc845e69a3b11e5c93 /drivers/net
parent5938ed90c0087020ba5c27d57b87174afde6907a (diff)
downloadlinaro-lsk-e1cef3c9843709fd913021679c3bf711c8301627.tar.gz
macvtap: update file current position
[ Upstream commit e6ebc7f16ca1434a334647aa56399c546be4e64b ] 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>
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 8aab10dc13e..66e37010b5e 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -903,6 +903,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;
}