mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
macvtap: update file current position
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
239c78db9c
commit
e6ebc7f16c
1 changed files with 2 additions and 0 deletions
|
@ -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 = 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? */
|
ret = min_t(ssize_t, ret, len); /* XXX copied from tun.c. Why? */
|
||||||
|
if (ret > 0)
|
||||||
|
iocb->ki_pos = ret;
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue