]> granicus.if.org Git - zfs/blob - config/kernel-dentry-operations.m4
Fix typos in config/
[zfs] / config / kernel-dentry-operations.m4
1 dnl #
2 dnl # 3.6 API change
3 dnl #
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>
9
10                 int revalidate (struct dentry *dentry,
11                     struct nameidata *nidata) { return 0; }
12
13                 static const struct dentry_operations
14                     dops __attribute__ ((unused)) = {
15                         .d_revalidate   = revalidate,
16                 };
17         ],[
18         ],[
19                 AC_MSG_RESULT(yes)
20                 AC_DEFINE(HAVE_D_REVALIDATE_NAMEIDATA, 1,
21                           [dops->d_revalidate() operation takes nameidata])
22         ],[
23                 AC_MSG_RESULT(no)
24         ])
25 ])
26
27 dnl #
28 dnl # 2.6.30 API change
29 dnl # The 'struct dentry_operations' was constified in the dentry structure.
30 dnl #
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>
35
36                 const struct dentry_operations test_d_op = {
37                         .d_revalidate = NULL,
38                 };
39         ],[
40                 struct dentry d __attribute__ ((unused));
41
42                 d.d_op = &test_d_op;
43         ],[
44                 AC_MSG_RESULT(yes)
45                 AC_DEFINE(HAVE_CONST_DENTRY_OPERATIONS, 1,
46                           [dentry uses const struct dentry_operations])
47         ],[
48                 AC_MSG_RESULT(no)
49         ])
50 ])
51
52 dnl #
53 dnl # 2.6.38 API change
54 dnl # Added d_set_d_op() helper function.
55 dnl #
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>
60         ], [
61                 d_set_d_op(NULL, NULL);
62         ], [d_set_d_op], [fs/dcache.c], [
63                 AC_MSG_RESULT(yes)
64                 AC_DEFINE(HAVE_D_SET_D_OP, 1,
65                           [d_set_d_op() is available])
66         ], [
67                 AC_MSG_RESULT(no)
68         ])
69 ])
70
71 dnl #
72 dnl # 2.6.38 API change
73 dnl # Added sb->s_d_op default dentry_operations member
74 dnl #
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([
78                 #include <linux/fs.h>
79         ],[
80                 struct super_block sb __attribute__ ((unused));
81                 sb.s_d_op = NULL;
82         ], [
83                 AC_MSG_RESULT(yes)
84                 AC_DEFINE(HAVE_S_D_OP, 1, [struct super_block has s_d_op])
85         ], [
86                 AC_MSG_RESULT(no)
87         ])
88 ])