diff options
author | Richard Yao <[email protected]> | 2012-08-16 19:31:54 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-10-14 15:29:26 -0700 |
commit | 95f5c63b47d8f8294b38843f9ba710e97b749b63 (patch) | |
tree | 6bea5a895ae24d30f78260a8bf16fc24254cc015 /config/kernel-mkdir-umode-t.m4 | |
parent | 558ef6d0805457654938dbe56c9a19b0121a712d (diff) |
Linux 3.6 compat, iops->mkdir()
Use .mkdir instead of .create in 3.3 compatibility check. Linux 3.6
modifies inode_operations->create's function prototype. This causes
an autotools Linux 3.3. compatibility check for a function prototype
change in create, mkdir and mknode to fail. Since mkdir and mknode
are unchanged, we modify the check to examine it instead.
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #873
Diffstat (limited to 'config/kernel-mkdir-umode-t.m4')
-rw-r--r-- | config/kernel-mkdir-umode-t.m4 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/config/kernel-mkdir-umode-t.m4 b/config/kernel-mkdir-umode-t.m4 new file mode 100644 index 000000000..dd5d94ba9 --- /dev/null +++ b/config/kernel-mkdir-umode-t.m4 @@ -0,0 +1,25 @@ +dnl # +dnl # 3.3 API change +dnl # The VFS .create, .mkdir and .mknod callbacks were updated to take a +dnl # umode_t type rather than an int. The expectation is that any backport +dnl # would also change all three prototypes. However, if it turns out that +dnl # some distribution doesn't backport the whole thing this could be +dnl # broken apart in to three seperate checks. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_MKDIR_UMODE_T], [ + AC_MSG_CHECKING([whether iops->create()/mkdir()/mknod() take umode_t]) + ZFS_LINUX_TRY_COMPILE([ + #include <linux/fs.h> + ],[ + int (*mkdir) (struct inode *,struct dentry *,umode_t) = NULL; + struct inode_operations iops __attribute__ ((unused)) = { + .mkdir = mkdir, + }; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_MKDIR_UMODE_T, 1, + [iops->create()/mkdir()/mknod() take umode_t]) + ],[ + AC_MSG_RESULT(no) + ]) +]) |