mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
linux/uio: remove "skip" offset for UIO_ITER
For UIO_ITER, we are just wrapping a kernel iterator. It will take care
of its own offsets if necessary. We don't need to do anything, and if we
do try to do anything with it (like advancing the iterator by the skip
in zfs_uio_advance) we're just confusing the kernel iterator, ending up
at the wrong position or worse, off the end of the memory region.
Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #17298
(cherry picked from commit 2ee5b51a57)
This commit is contained in:
@@ -268,9 +268,6 @@ zfs_uiomove_iter(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio,
|
||||
{
|
||||
size_t cnt = MIN(n, uio->uio_resid);
|
||||
|
||||
if (uio->uio_skip)
|
||||
iov_iter_advance(uio->uio_iter, uio->uio_skip);
|
||||
|
||||
if (rw == UIO_READ)
|
||||
cnt = copy_to_iter(p, cnt, uio->uio_iter);
|
||||
else
|
||||
|
||||
@@ -227,7 +227,8 @@ zpl_uio_init(zfs_uio_t *uio, struct kiocb *kiocb, struct iov_iter *to,
|
||||
loff_t pos, ssize_t count, size_t skip)
|
||||
{
|
||||
#if defined(HAVE_VFS_IOV_ITER)
|
||||
zfs_uio_iov_iter_init(uio, to, pos, count, skip);
|
||||
(void) skip;
|
||||
zfs_uio_iov_iter_init(uio, to, pos, count);
|
||||
#else
|
||||
zfs_uio_iovec_init(uio, zfs_uio_iter_iov(to), to->nr_segs, pos,
|
||||
zfs_uio_iov_iter_type(to) & ITER_KVEC ?
|
||||
|
||||
Reference in New Issue
Block a user