mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 17:51:57 +09:00
macvtap: update file current position
[ Upstream commit e6ebc7f16c ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5938ed90c0
commit
e1cef3c984
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user