mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Use sb->s_d_op default dentry operations
As of Linux 2.6.37 the right way to register custom dentry operations is to use the super block's ->s_d_op field. For older kernels they should be registered as part of the lookup operation. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1223
This commit is contained in:
@@ -62,3 +62,22 @@ AC_DEFUN([ZFS_AC_KERNEL_D_SET_D_OP],
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 2.6.38 API chage
|
||||
dnl # Added sb->s_d_op default dentry_operations member
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_S_D_OP],
|
||||
[AC_MSG_CHECKING([whether super_block has s_d_op])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/fs.h>
|
||||
],[
|
||||
struct super_block sb __attribute__ ((unused));
|
||||
sb.s_d_op = NULL;
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_S_D_OP, 1, [struct super_block has s_d_op])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
@@ -71,6 +71,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
|
||||
ZFS_AC_KERNEL_CALLBACK_SECURITY_INODE_INIT_SECURITY
|
||||
ZFS_AC_KERNEL_MOUNT_NODEV
|
||||
ZFS_AC_KERNEL_SHRINK
|
||||
ZFS_AC_KERNEL_S_D_OP
|
||||
ZFS_AC_KERNEL_BDI
|
||||
ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER
|
||||
ZFS_AC_KERNEL_SET_NLINK
|
||||
|
||||
Reference in New Issue
Block a user