diff --git a/config/kernel-inode-lock.m4 b/config/kernel-inode-lock.m4 deleted file mode 100644 index 5eb04af78..000000000 --- a/config/kernel-inode-lock.m4 +++ /dev/null @@ -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 - ],[ - 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) - ]) -]) diff --git a/config/kernel.m4 b/config/kernel.m4 index 90f79eabd..33e247721 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -51,7 +51,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL ZFS_AC_KERNEL_SRC_WAIT ZFS_AC_KERNEL_SRC_INODE_TIMES - ZFS_AC_KERNEL_SRC_INODE_LOCK ZFS_AC_KERNEL_SRC_RW ZFS_AC_KERNEL_SRC_TIMER_SETUP 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_WAIT ZFS_AC_KERNEL_INODE_TIMES - ZFS_AC_KERNEL_INODE_LOCK ZFS_AC_KERNEL_RW ZFS_AC_KERNEL_TIMER_SETUP ZFS_AC_KERNEL_SUPER_USER_NS diff --git a/include/os/linux/spl/sys/file.h b/include/os/linux/spl/sys/file.h index e0bbd6d98..38d19d8c6 100644 --- a/include/os/linux/spl/sys/file.h +++ b/include/os/linux/spl/sys/file.h @@ -28,7 +28,6 @@ #define FKIOCTL 0x80000000 #define ED_CASE_CONFLICT 0x10 -#ifdef HAVE_INODE_LOCK_SHARED #define spl_inode_lock(ip) inode_lock(ip) #define spl_inode_unlock(ip) inode_unlock(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_is_locked(ip) inode_is_locked(ip) #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 */