config: remove HAVE_INODE_LOCK_SHARED

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #16479
This commit is contained in:
Rob Norris 2024-08-16 16:57:45 +10:00 committed by Brian Behlendorf
parent 6374171bb4
commit d1a07741f8
3 changed files with 0 additions and 37 deletions

View File

@ -1,24 +0,0 @@
dnl #
dnl # 4.7 API change
dnl # i_mutex is changed to i_rwsem. Instead of directly using
dnl # i_mutex/i_rwsem, we should use inode_lock() and inode_lock_shared()
dnl # We test inode_lock_shared because inode_lock is introduced earlier.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_LOCK], [
ZFS_LINUX_TEST_SRC([inode_lock], [
#include <linux/fs.h>
],[
struct inode *inode = NULL;
inode_lock_shared(inode);
])
])
AC_DEFUN([ZFS_AC_KERNEL_INODE_LOCK], [
AC_MSG_CHECKING([whether inode_lock_shared() exists])
ZFS_LINUX_TEST_RESULT([inode_lock], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_INODE_LOCK_SHARED, 1, [yes])
],[
AC_MSG_RESULT(no)
])
])

View File

@ -51,7 +51,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL
ZFS_AC_KERNEL_SRC_WAIT ZFS_AC_KERNEL_SRC_WAIT
ZFS_AC_KERNEL_SRC_INODE_TIMES ZFS_AC_KERNEL_SRC_INODE_TIMES
ZFS_AC_KERNEL_SRC_INODE_LOCK
ZFS_AC_KERNEL_SRC_RW ZFS_AC_KERNEL_SRC_RW
ZFS_AC_KERNEL_SRC_TIMER_SETUP ZFS_AC_KERNEL_SRC_TIMER_SETUP
ZFS_AC_KERNEL_SRC_SUPER_USER_NS ZFS_AC_KERNEL_SRC_SUPER_USER_NS
@ -184,7 +183,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL
ZFS_AC_KERNEL_WAIT ZFS_AC_KERNEL_WAIT
ZFS_AC_KERNEL_INODE_TIMES ZFS_AC_KERNEL_INODE_TIMES
ZFS_AC_KERNEL_INODE_LOCK
ZFS_AC_KERNEL_RW ZFS_AC_KERNEL_RW
ZFS_AC_KERNEL_TIMER_SETUP ZFS_AC_KERNEL_TIMER_SETUP
ZFS_AC_KERNEL_SUPER_USER_NS ZFS_AC_KERNEL_SUPER_USER_NS

View File

@ -28,7 +28,6 @@
#define FKIOCTL 0x80000000 #define FKIOCTL 0x80000000
#define ED_CASE_CONFLICT 0x10 #define ED_CASE_CONFLICT 0x10
#ifdef HAVE_INODE_LOCK_SHARED
#define spl_inode_lock(ip) inode_lock(ip) #define spl_inode_lock(ip) inode_lock(ip)
#define spl_inode_unlock(ip) inode_unlock(ip) #define spl_inode_unlock(ip) inode_unlock(ip)
#define spl_inode_lock_shared(ip) inode_lock_shared(ip) #define spl_inode_lock_shared(ip) inode_lock_shared(ip)
@ -37,15 +36,5 @@
#define spl_inode_trylock_shared(ip) inode_trylock_shared(ip) #define spl_inode_trylock_shared(ip) inode_trylock_shared(ip)
#define spl_inode_is_locked(ip) inode_is_locked(ip) #define spl_inode_is_locked(ip) inode_is_locked(ip)
#define spl_inode_lock_nested(ip, s) inode_lock_nested(ip, s) #define spl_inode_lock_nested(ip, s) inode_lock_nested(ip, s)
#else
#define spl_inode_lock(ip) mutex_lock(&(ip)->i_mutex)
#define spl_inode_unlock(ip) mutex_unlock(&(ip)->i_mutex)
#define spl_inode_lock_shared(ip) mutex_lock(&(ip)->i_mutex)
#define spl_inode_unlock_shared(ip) mutex_unlock(&(ip)->i_mutex)
#define spl_inode_trylock(ip) mutex_trylock(&(ip)->i_mutex)
#define spl_inode_trylock_shared(ip) mutex_trylock(&(ip)->i_mutex)
#define spl_inode_is_locked(ip) mutex_is_locked(&(ip)->i_mutex)
#define spl_inode_lock_nested(ip, s) mutex_lock_nested(&(ip)->i_mutex, s)
#endif
#endif /* SPL_FILE_H */ #endif /* SPL_FILE_H */