diff options
author | Yuxuan Shui <[email protected]> | 2012-10-12 21:40:53 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-10-14 13:06:48 -0700 |
commit | 3c203610756f98f275c7c9f731d67a38b1111509 (patch) | |
tree | b174c474d8947251ed09268a768b5e39c4addc43 /config/kernel-sget-args.m4 | |
parent | af26c4d4ab545767456d8c21ed48e9e01ce6a3e7 (diff) |
Linux 3.6 compat, sget()
As of Linux commit 9249e17fe094d853d1ef7475dd559a2cc7e23d42 the
mount flags are now passed to sget() so they can be used when
initializing a new superblock.
ZFS never uses sget() in this fashion so we can simply pass a
zero and add a zpl_sget() compatibility wrapper.
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #873
Diffstat (limited to 'config/kernel-sget-args.m4')
-rw-r--r-- | config/kernel-sget-args.m4 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/config/kernel-sget-args.m4 b/config/kernel-sget-args.m4 new file mode 100644 index 000000000..9d1745925 --- /dev/null +++ b/config/kernel-sget-args.m4 @@ -0,0 +1,23 @@ +dnl # +dnl # 3.6 API change, +dnl # 'sget' now takes the mount flags as an argument. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_5ARG_SGET], + [AC_MSG_CHECKING([whether sget() wants 5 args]) + ZFS_LINUX_TRY_COMPILE([ + #include <linux/fs.h> + ],[ + struct file_system_type *type = NULL; + int (*test)(struct super_block *,void *) = NULL; + int (*set)(struct super_block *,void *) = NULL; + int flags = 0; + void *data = NULL; + (void) sget(type, test, set, flags, data); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_5ARG_SGET, 1, [sget() wants 5 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + |