4 AC_DEFUN([ZFS_AC_KERNEL_D_REVALIDATE_NAMEIDATA], [
5 AC_MSG_CHECKING([whether dops->d_revalidate() takes struct nameidata])
6 ZFS_LINUX_TRY_COMPILE([
7 #include <linux/dcache.h>
9 int revalidate (struct dentry *dentry,
10 struct nameidata *nidata) { return 0; }
12 static const struct dentry_operations
13 dops __attribute__ ((unused)) = {
14 .d_revalidate = revalidate,
19 AC_DEFINE(HAVE_D_REVALIDATE_NAMEIDATA, 1,
20 [dops->d_revalidate() operation takes nameidata])
27 dnl # 2.6.30 API change
28 dnl # The 'struct dentry_operations' was constified in the dentry structure.
30 AC_DEFUN([ZFS_AC_KERNEL_CONST_DENTRY_OPERATIONS], [
31 AC_MSG_CHECKING([whether dentry uses const struct dentry_operations])
32 ZFS_LINUX_TRY_COMPILE([
33 #include <linux/dcache.h>
35 const struct dentry_operations test_d_op = {
39 struct dentry d __attribute__ ((unused));
44 AC_DEFINE(HAVE_CONST_DENTRY_OPERATIONS, 1,
45 [dentry uses const struct dentry_operations])
52 dnl # 2.6.38 API change
53 dnl # Added d_set_d_op() helper function.
55 AC_DEFUN([ZFS_AC_KERNEL_D_SET_D_OP],
56 [AC_MSG_CHECKING([whether d_set_d_op() is available])
57 ZFS_LINUX_TRY_COMPILE_SYMBOL([
58 #include <linux/dcache.h>
60 d_set_d_op(NULL, NULL);
61 ], [d_set_d_op], [fs/dcache.c], [
63 AC_DEFINE(HAVE_D_SET_D_OP, 1,
64 [d_set_d_op() is available])
71 dnl # 2.6.38 API chage
72 dnl # Added sb->s_d_op default dentry_operations member
74 AC_DEFUN([ZFS_AC_KERNEL_S_D_OP],
75 [AC_MSG_CHECKING([whether super_block has s_d_op])
76 ZFS_LINUX_TRY_COMPILE([
79 struct super_block sb __attribute__ ((unused));
83 AC_DEFINE(HAVE_S_D_OP, 1, [struct super_block has s_d_op])