diff options
author | Jorgen Lundman <[email protected]> | 2020-06-15 02:09:55 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-14 10:09:55 -0700 |
commit | 883a40fff427d200be41d3faabab1dca9a84b353 (patch) | |
tree | ce4521d15b4abcb6712baf0de6a840bfa884fd20 /module/zfs/zfs_sa.c | |
parent | 4f73576ea15fcf38b344b008eaf355480a08bbff (diff) |
Add convenience wrappers for common uio usage
The macOS uio struct is opaque and the API must be used, this
makes the smallest changes to the code for all platforms.
Reviewed-by: Matt Macy <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Jorgen Lundman <[email protected]>
Closes #10412
Diffstat (limited to 'module/zfs/zfs_sa.c')
-rw-r--r-- | module/zfs/zfs_sa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/zfs_sa.c b/module/zfs/zfs_sa.c index e20e92f12..cbb773ffb 100644 --- a/module/zfs/zfs_sa.c +++ b/module/zfs/zfs_sa.c @@ -81,13 +81,13 @@ zfs_sa_readlink(znode_t *zp, uio_t *uio) if (bufsz + ZFS_OLD_ZNODE_PHYS_SIZE <= db->db_size) { error = uiomove((caddr_t)db->db_data + ZFS_OLD_ZNODE_PHYS_SIZE, - MIN((size_t)bufsz, uio->uio_resid), UIO_READ, uio); + MIN((size_t)bufsz, uio_resid(uio)), UIO_READ, uio); } else { dmu_buf_t *dbp; if ((error = dmu_buf_hold(ZTOZSB(zp)->z_os, zp->z_id, 0, FTAG, &dbp, DMU_READ_NO_PREFETCH)) == 0) { error = uiomove(dbp->db_data, - MIN((size_t)bufsz, uio->uio_resid), UIO_READ, uio); + MIN((size_t)bufsz, uio_resid(uio)), UIO_READ, uio); dmu_buf_rele(dbp, FTAG); } } |