mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 5.16: type member of iov_iter renamed iter_type
The iov_iter->type member was renamed iov_iter->iter_type. However, while looking into this, realized that in 2018 a iov_iter_type(*iov) accessor function was introduced. So if that is present, use it, otherwise fall back to trying the existing behavior of directly accessing type from iov_iter. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes #12819
This commit is contained in:
committed by
Brian Behlendorf
parent
435a451e5c
commit
f6e22561d2
@@ -250,11 +250,17 @@ zpl_uio_init(zfs_uio_t *uio, struct kiocb *kiocb, struct iov_iter *to,
|
||||
{
|
||||
#if defined(HAVE_VFS_IOV_ITER)
|
||||
zfs_uio_iov_iter_init(uio, to, pos, count, skip);
|
||||
#else
|
||||
#ifdef HAVE_IOV_ITER_TYPE
|
||||
zfs_uio_iovec_init(uio, to->iov, to->nr_segs, pos,
|
||||
iov_iter_type(to) & ITER_KVEC ? UIO_SYSSPACE : UIO_USERSPACE,
|
||||
count, skip);
|
||||
#else
|
||||
zfs_uio_iovec_init(uio, to->iov, to->nr_segs, pos,
|
||||
to->type & ITER_KVEC ? UIO_SYSSPACE : UIO_USERSPACE,
|
||||
count, skip);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
|
||||
Reference in New Issue
Block a user