]) # 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
# 3.13
LC_VFS_RENAME_5ARGS
+ LC_VFS_UNLINK_3ARGS
#
AS_IF([test "x$enable_server" != xno], [
#define ll_vfs_rename(a, b, c, d) vfs_rename(a, b, c, d)
#endif
+#ifdef HAVE_VFS_UNLINK_3ARGS
+#define ll_vfs_unlink(a, b) vfs_unlink(a, b, NULL)
+#else
+#define ll_vfs_unlink(a, b) vfs_unlink(a, b)
+#endif
+
#endif /* _COMPAT25_H */
/* If the src object has never been modified, then remove it. */
if (inode->i_size == 0 && inode->i_mode & S_ISUID &&
inode->i_mode & S_ISGID) {
- rc = vfs_unlink(src_parent, src_child);
+ rc = ll_vfs_unlink(src_parent, src_child);
if (unlikely(rc == -ENOENT))
rc = 0;
}