diff options
author | Coleman Kane <[email protected]> | 2023-07-30 15:23:47 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2023-09-19 08:50:01 -0700 |
commit | 8be6308e85cffb2247753033fbfc3641f731af51 (patch) | |
tree | 0fc6dbc4ee885f312aa4bb1c06d3f003bc0c3418 /module | |
parent | 0bf2c5365ed3afa65545393d8da2317699f18b30 (diff) |
Linux 4.20 compat: wrapper function for iov_iter type access
An iov_iter_type() function to access the "type" member of the struct
iov_iter was added at one point. Move the conditional logic to decide
which method to use for accessing it into a macro and simplify the
zpl_uio_init code.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Brian Atkinson <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes #15100
Diffstat (limited to 'module')
-rw-r--r-- | module/os/linux/zfs/zpl_file.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c index aedafd600..f6af2ebd1 100644 --- a/module/os/linux/zfs/zpl_file.c +++ b/module/os/linux/zfs/zpl_file.c @@ -300,13 +300,10 @@ 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); -#elif defined(HAVE_IOV_ITER_TYPE) - zfs_uio_iovec_init(uio, zfs_uio_iter_iov(to), to->nr_segs, pos, - iov_iter_type(to) & ITER_KVEC ? UIO_SYSSPACE : UIO_USERSPACE, - count, skip); #else zfs_uio_iovec_init(uio, zfs_uio_iter_iov(to), to->nr_segs, pos, - to->type & ITER_KVEC ? UIO_SYSSPACE : UIO_USERSPACE, + zfs_uio_iov_iter_type(to) & ITER_KVEC ? + UIO_SYSSPACE : UIO_USERSPACE, count, skip); #endif } |