From 4e46cb6546cd775266870fe1318298d4df8f5894 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Wed, 21 Sep 2022 00:34:41 +0200 Subject: [PATCH] Retire ZFS_TEARDOWN_TRY_ENTER_READ There were never any users and it so happens the operation is not even supported by rrm locks -- the macros were wrong for Linux and FreeBSD when not using it's RMS locks. Reviewed-by: Richard Yao Reviewed-by: Brian Behlendorf Signed-off-by: Mateusz Guzik Closes #13906 --- include/os/freebsd/zfs/sys/zfs_vfsops_os.h | 6 ------ include/os/linux/zfs/sys/zfs_vfsops_os.h | 3 --- 2 files changed, 9 deletions(-) diff --git a/include/os/freebsd/zfs/sys/zfs_vfsops_os.h b/include/os/freebsd/zfs/sys/zfs_vfsops_os.h index c44f7c6f06b1..f765d38dbac8 100644 --- a/include/os/freebsd/zfs/sys/zfs_vfsops_os.h +++ b/include/os/freebsd/zfs/sys/zfs_vfsops_os.h @@ -128,9 +128,6 @@ struct zfsvfs { #define ZFS_TEARDOWN_DESTROY(zfsvfs) \ rms_destroy(&(zfsvfs)->z_teardown_lock) -#define ZFS_TEARDOWN_TRY_ENTER_READ(zfsvfs) \ - rms_try_rlock(&(zfsvfs)->z_teardown_lock) - #define ZFS_TEARDOWN_ENTER_READ(zfsvfs, tag) \ rms_rlock(&(zfsvfs)->z_teardown_lock); @@ -161,9 +158,6 @@ struct zfsvfs { #define ZFS_TEARDOWN_DESTROY(zfsvfs) \ rrm_destroy(&(zfsvfs)->z_teardown_lock) -#define ZFS_TEARDOWN_TRY_ENTER_READ(zfsvfs) \ - rw_tryenter(&(zfsvfs)->z_teardown_lock, RW_READER) - #define ZFS_TEARDOWN_ENTER_READ(zfsvfs, tag) \ rrm_enter_read(&(zfsvfs)->z_teardown_lock, tag); diff --git a/include/os/linux/zfs/sys/zfs_vfsops_os.h b/include/os/linux/zfs/sys/zfs_vfsops_os.h index 697ae2018ec4..e320b8de4222 100644 --- a/include/os/linux/zfs/sys/zfs_vfsops_os.h +++ b/include/os/linux/zfs/sys/zfs_vfsops_os.h @@ -143,9 +143,6 @@ struct zfsvfs { #define ZFS_TEARDOWN_DESTROY(zfsvfs) \ rrm_destroy(&(zfsvfs)->z_teardown_lock) -#define ZFS_TEARDOWN_TRY_ENTER_READ(zfsvfs) \ - rw_tryenter(&(zfsvfs)->z_teardown_lock, RW_READER) - #define ZFS_TEARDOWN_ENTER_READ(zfsvfs, tag) \ rrm_enter_read(&(zfsvfs)->z_teardown_lock, tag);