From: Zhi Yong Wu Date: Fri, 6 Dec 2013 06:16:50 +0000 (+0800) Subject: macvtap: update file current position X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e6ebc7f16ca1434a334647aa56399c546be4e64b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git macvtap: update file current position Signed-off-by: Zhi Yong Wu Signed-off-by: David S. Miller --- 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; }