From 5ebe425a5bf332ab1d77d78eb3bfd9594b5d7250 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Wed, 4 Nov 2020 17:23:48 -0500 Subject: Macroify teardown lock handling This will allow platforms to implement it as they see fit, in particular in a different manner than rrm locks. Reviewed-by: Ryan Moeller Reviewed-by: Brian Behlendorf Reviewed-by: Matt Macy Signed-off-by: Mateusz Guzik Closes #11153 --- include/os/freebsd/zfs/sys/zfs_znode_impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/os/freebsd/zfs/sys/zfs_znode_impl.h') diff --git a/include/os/freebsd/zfs/sys/zfs_znode_impl.h b/include/os/freebsd/zfs/sys/zfs_znode_impl.h index 7a60eb58b..d7cdb360c 100644 --- a/include/os/freebsd/zfs/sys/zfs_znode_impl.h +++ b/include/os/freebsd/zfs/sys/zfs_znode_impl.h @@ -124,15 +124,15 @@ extern minor_t zfsdev_minor_alloc(void); /* Called on entry to each ZFS vnode and vfs operation */ #define ZFS_ENTER(zfsvfs) \ { \ - rrm_enter_read(&(zfsvfs)->z_teardown_lock, FTAG); \ + ZFS_TEARDOWN_ENTER_READ((zfsvfs), FTAG); \ if (__predict_false((zfsvfs)->z_unmounted)) { \ - ZFS_EXIT(zfsvfs); \ + ZFS_TEARDOWN_EXIT_READ(zfsvfs, FTAG); \ return (EIO); \ } \ } /* Must be called before exiting the vop */ -#define ZFS_EXIT(zfsvfs) rrm_exit(&(zfsvfs)->z_teardown_lock, FTAG) +#define ZFS_EXIT(zfsvfs) ZFS_TEARDOWN_EXIT_READ(zfsvfs, FTAG) /* Verifies the znode is valid */ #define ZFS_VERIFY_ZP(zp) \ -- cgit v1.2.3