aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2013-03-04 00:02:43 -0500
committerBrian Behlendorf <[email protected]>2013-03-14 10:43:26 -0700
commit2a305c34c8876c06f55475e5ff5163923baa5491 (patch)
treed068788dbf4f7854c789d5d41e729a0c3c9ebe9c /config
parentbc90df66887af63bd67223616f9084c4e9567056 (diff)
Linux 3.9 compat: vfs_getattr takes two arguments
The function prototype of vfs_getattr previoulsy took struct vfsmount * and struct dentry * as arguments. These would always be defined together in a struct path *. torvalds/linux@3dadecce20603aa380023c65e6f55f108fd5e952 modified vfs_getattr to take struct path * is taken as an argument instead. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'config')
-rw-r--r--config/spl-build.m432
1 files changed, 32 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index eef3a76ae..83cefabd4 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -89,6 +89,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_SHRINK_CONTROL_STRUCT
SPL_AC_RWSEM_SPINLOCK_IS_RAW
SPL_AC_SCHED_RT_HEADER
+ SPL_AC_2ARGS_VFS_GETATTR
])
AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
@@ -2237,3 +2238,34 @@ AC_DEFUN([SPL_AC_SCHED_RT_HEADER],
AC_MSG_RESULT(no)
])
])
+
+dnl #
+dnl # 3.9 API change,
+dnl # vfs_getattr() uses 2 args
+dnl # It takes struct path * instead of struct vfsmount * and struct dentry *
+dnl #
+AC_DEFUN([SPL_AC_2ARGS_VFS_GETATTR], [
+ AC_MSG_CHECKING([whether vfs_getattr() wants])
+ SPL_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ ],[
+ vfs_getattr((struct path *) NULL,
+ (struct kstat *)NULL);
+ ],[
+ AC_MSG_RESULT(2 args)
+ AC_DEFINE(HAVE_2ARGS_VFS_GETATTR, 1,
+ [vfs_getattr wants 2 args])
+ ],[
+ SPL_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ ],[
+ vfs_getattr((struct vfsmount *)NULL,
+ (struct dentry *)NULL,
+ (struct kstat *)NULL);
+ ],[
+ AC_MSG_RESULT(3 args)
+ ],[
+ AC_MSG_ERROR(unknown)
+ ])
+ ])
+])