Skip to content

Commit e6ebc7f

Browse files
Zhi Yong Wudavem330
authored andcommitted
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>
1 parent 239c78d commit e6ebc7f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/net/macvtap.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,8 @@ static ssize_t macvtap_aio_read(struct kiocb *iocb, const struct iovec *iv,
876876

877877
ret = macvtap_do_read(q, iocb, iv, len, file->f_flags & O_NONBLOCK);
878878
ret = min_t(ssize_t, ret, len); /* XXX copied from tun.c. Why? */
879+
if (ret > 0)
880+
iocb->ki_pos = ret;
879881
out:
880882
return ret;
881883
}

0 commit comments

Comments
 (0)