summaryrefslogtreecommitdiffstats
path: root/config/kernel-dentry-operations.m4
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-01-18 14:11:40 -0800
committerBrian Behlendorf <[email protected]>2013-01-18 15:04:23 -0800
commitee93035378ff1f0769bb4216dc35057a2f14f9b9 (patch)
treef5e044f0670eefb9af4d23c91c5707926d5c0128 /config/kernel-dentry-operations.m4
parentbabf3f9b6d9294b0a88457941d60af5d9d7b744d (diff)
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 <[email protected]> Closes #1223
Diffstat (limited to 'config/kernel-dentry-operations.m4')
-rw-r--r--config/kernel-dentry-operations.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/config/kernel-dentry-operations.m4 b/config/kernel-dentry-operations.m4
index 5685b7d6f..dfbea7dfd 100644
--- a/config/kernel-dentry-operations.m4
+++ b/config/kernel-dentry-operations.m4
@@ -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)
+ ])
+])