mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 06:50:08 +00:00
tun: 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
e6ebc7f16c
commit
d0b7da8afa
@ -1356,6 +1356,8 @@ static ssize_t tun_chr_aio_read(struct kiocb *iocb, const struct iovec *iv,
|
||||
ret = tun_do_read(tun, tfile, iocb, iv, len,
|
||||
file->f_flags & O_NONBLOCK);
|
||||
ret = min_t(ssize_t, ret, len);
|
||||
if (ret > 0)
|
||||
iocb->ki_pos = ret;
|
||||
out:
|
||||
tun_put(tun);
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user