summaryrefslogtreecommitdiff
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:27:10 -0800
commitd717ca464061e93f0e125e81ae16993da66094f2 (patch)
treebdd41c48fb47607c1137de2f7300d38c3d7489eb
parentb4c3eac4fe4e12260614f5d724a3ab8ce21e486a (diff)
downloadlwn-d717ca464061e93f0e125e81ae16993da66094f2.tar.gz
lwn-d717ca464061e93f0e125e81ae16993da66094f2.zip
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>
-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 accd46882416..dda5bcc9567b 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -905,6 +905,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;
}