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>
8 #include <linux/sched.h>
10 int revalidate (struct dentry *dentry,
11 struct nameidata *nidata) { return 0; }
13 static const struct dentry_operations
14 dops __attribute__ ((unused)) = {
15 .d_revalidate = revalidate,
20 AC_DEFINE(HAVE_D_REVALIDATE_NAMEIDATA, 1,
21 [dops->d_revalidate() operation takes nameidata])
28 dnl # 2.6.30 API change
29 dnl # The 'struct dentry_operations' was constified in the dentry structure.
31 AC_DEFUN([ZFS_AC_KERNEL_CONST_DENTRY_OPERATIONS], [
32 AC_MSG_CHECKING([whether dentry uses const struct dentry_operations])
33 ZFS_LINUX_TRY_COMPILE([
34 #include <linux/dcache.h>
36 const struct dentry_operations test_d_op = {
40 struct dentry d __attribute__ ((unused));
45 AC_DEFINE(HAVE_CONST_DENTRY_OPERATIONS, 1,
46 [dentry uses const struct dentry_operations])
53 dnl # 2.6.38 API change
54 dnl # Added d_set_d_op() helper function.
56 AC_DEFUN([ZFS_AC_KERNEL_D_SET_D_OP],
57 [AC_MSG_CHECKING([whether d_set_d_op() is available])
58 ZFS_LINUX_TRY_COMPILE_SYMBOL([
59 #include <linux/dcache.h>
61 d_set_d_op(NULL, NULL);
62 ], [d_set_d_op], [fs/dcache.c], [
64 AC_DEFINE(HAVE_D_SET_D_OP, 1,
65 [d_set_d_op() is available])
72 dnl # 2.6.38 API change
73 dnl # Added sb->s_d_op default dentry_operations member
75 AC_DEFUN([ZFS_AC_KERNEL_S_D_OP],
76 [AC_MSG_CHECKING([whether super_block has s_d_op])
77 ZFS_LINUX_TRY_COMPILE([
80 struct super_block sb __attribute__ ((unused));
84 AC_DEFINE(HAVE_S_D_OP, 1, [struct super_block has s_d_op])