summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2013-11-25 11:22:33 -0500
committerBrian Behlendorf <[email protected]>2013-12-02 10:37:49 -0800
commit50a0749eba31e821a7edf286f1e3b149f7d13c59 (patch)
tree46c33d5514b1f9d10d3f62fc1386dde95a5cfe58 /config
parent3e96de17d723d6f6c9e2fd04b059b50d4e0bbef0 (diff)
Linux 3.13 compat: Pass NULL for new delegated inode argument
This check was originally added for SLES10, a093c6a, to check for a 'struct vfsmount *' argument which they added. However, since SLES10 is based on a 2.6.16 kernel which is no longer supported this functionality was dropped. The checks were refactored to support Linux 3.13 without concern for historical versions. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #312
Diffstat (limited to 'config')
-rw-r--r--config/spl-build.m452
1 files changed, 42 insertions, 10 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index 7d744db13..84267807d 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -1842,41 +1842,73 @@ AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST],
EXTRA_KCFLAGS="$tmp_flags"
])
-dnl #
-dnl # SLES API change, never adopted in mainline,
-dnl # Third 'struct vfsmount *' argument removed.
-dnl #
AC_DEFUN([SPL_AC_2ARGS_VFS_UNLINK],
[AC_MSG_CHECKING([whether vfs_unlink() wants 2 args])
SPL_LINUX_TRY_COMPILE([
#include <linux/fs.h>
],[
- vfs_unlink(NULL, NULL);
+ vfs_unlink((struct inode *) NULL, (struct dentry *) NULL);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_2ARGS_VFS_UNLINK, 1,
[vfs_unlink() wants 2 args])
],[
AC_MSG_RESULT(no)
+ dnl #
+ dnl # Linux 3.13 API change
+ dnl # Added delegated inode
+ dnl #
+ AC_MSG_CHECKING([whether vfs_unlink() wants 3 args])
+ SPL_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ ],[
+ vfs_unlink((struct inode *) NULL,
+ (struct dentry *) NULL,
+ (struct inode **) NULL);
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_3ARGS_VFS_UNLINK, 1,
+ [vfs_unlink() wants 3 args])
+ ],[
+ AC_MSG_ERROR(no)
+ ])
+
])
])
-dnl #
-dnl # SLES API change, never adopted in mainline,
-dnl # Third and sixth 'struct vfsmount *' argument removed.
-dnl #
AC_DEFUN([SPL_AC_4ARGS_VFS_RENAME],
[AC_MSG_CHECKING([whether vfs_rename() wants 4 args])
SPL_LINUX_TRY_COMPILE([
#include <linux/fs.h>
],[
- vfs_rename(NULL, NULL, NULL, NULL);
+ vfs_rename((struct inode *) NULL, (struct dentry *) NULL,
+ (struct inode *) NULL, (struct dentry *) NULL);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_4ARGS_VFS_RENAME, 1,
[vfs_rename() wants 4 args])
],[
AC_MSG_RESULT(no)
+ dnl #
+ dnl # Linux 3.13 API change
+ dnl # Added delegated inode
+ dnl #
+ AC_MSG_CHECKING([whether vfs_rename() wants 5 args])
+ SPL_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ ],[
+ vfs_rename((struct inode *) NULL,
+ (struct dentry *) NULL,
+ (struct inode *) NULL,
+ (struct dentry *) NULL,
+ (struct inode **) NULL);
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_5ARGS_VFS_RENAME, 1,
+ [vfs_rename() wants 5 args])
+ ],[
+ AC_MSG_ERROR(no)
+ ])
])
])