Whamcloud - gitweb
LU-5014 osd-ldiskfs: vfs_unlink api changed
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index 991c1e1..8e471bb 100644 (file)
@@ -1451,6 +1451,23 @@ vfs_rename_5args, [
 ]) # LC_VFS_RENAME_5ARGS
 
 #
+# LC_VFS_UNLINK_3ARGS
+#
+# 3.13 has vfs_renane with 3 args
+#
+AC_DEFUN([LC_VFS_UNLINK_3ARGS], [
+LB_CHECK_COMPILE([if Linux kernel has 'vfs_unlink' with 3 args],
+vfs_unlink_3args, [
+       #include <linux/fs.h>
+],[
+       vfs_unlink(NULL, NULL, NULL);
+], [
+       AC_DEFINE(HAVE_VFS_UNLINK_3ARGS, 1,
+               [kernel has vfs_unlink with 3 args])
+])
+]) # LC_VFS_UNLINK_3ARGS
+
+#
 # LC_PROG_LINUX
 #
 # Lustre linux kernel checks
@@ -1566,6 +1583,7 @@ AC_DEFUN([LC_PROG_LINUX], [
 
        # 3.13
        LC_VFS_RENAME_5ARGS
+       LC_VFS_UNLINK_3ARGS
 
        #
        AS_IF([test "x$enable_server" != xno], [