From: Zhi Yong Wu Date: Fri, 6 Dec 2013 06:16:50 +0000 (+0800) Subject: macvtap: update file current position X-Git-Tag: firefly_0821_release~3679^2~3113 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e1cef3c9843709fd913021679c3bf711c8301627;p=firefly-linux-kernel-4.4.55.git macvtap: update file current position [ Upstream commit e6ebc7f16ca1434a334647aa56399c546be4e64b ] Signed-off-by: Zhi Yong Wu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 8aab10dc13e2..66e37010b5ed 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; }