config: remove HAVE_RENAME2
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <robn@despairlabs.com>
This commit is contained in:
parent
0cf80154cb
commit
45de041e46
|
@ -1,23 +1,4 @@
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
|
||||||
dnl #
|
|
||||||
dnl # 3.9 (to 4.9) API change,
|
|
||||||
dnl #
|
|
||||||
dnl # A new version of iops->rename() was added (rename2) that takes a flag
|
|
||||||
dnl # argument (to support renameat2). However this separate function was
|
|
||||||
dnl # merged back into iops->rename() in Linux 4.9.
|
|
||||||
dnl #
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_rename2], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
static int rename2_fn(struct inode *sip, struct dentry *sdp,
|
|
||||||
struct inode *tip, struct dentry *tdp,
|
|
||||||
unsigned int flags) { return 0; }
|
|
||||||
|
|
||||||
static const struct inode_operations
|
|
||||||
iops __attribute__ ((unused)) = {
|
|
||||||
.rename2 = rename2_fn,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 4.9 API change,
|
dnl # 4.9 API change,
|
||||||
dnl #
|
dnl #
|
||||||
|
@ -85,13 +66,6 @@ AC_DEFUN([ZFS_AC_KERNEL_RENAME], [
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether iops->rename2() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_rename2], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_RENAME2, 1, [iops->rename2() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether iops->rename() wants flags])
|
AC_MSG_CHECKING([whether iops->rename() wants flags])
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_rename_flags], [
|
ZFS_LINUX_TEST_RESULT([inode_operations_rename_flags], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
@ -102,5 +76,4 @@ AC_DEFUN([ZFS_AC_KERNEL_RENAME], [
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
|
||||||
])
|
])
|
||||||
|
|
|
@ -591,7 +591,6 @@ zpl_rename2(struct inode *sdip, struct dentry *sdentry,
|
||||||
|
|
||||||
#if !defined(HAVE_IOPS_RENAME_USERNS) && \
|
#if !defined(HAVE_IOPS_RENAME_USERNS) && \
|
||||||
!defined(HAVE_RENAME_WANTS_FLAGS) && \
|
!defined(HAVE_RENAME_WANTS_FLAGS) && \
|
||||||
!defined(HAVE_RENAME2) && \
|
|
||||||
!defined(HAVE_IOPS_RENAME_IDMAP)
|
!defined(HAVE_IOPS_RENAME_IDMAP)
|
||||||
static int
|
static int
|
||||||
zpl_rename(struct inode *sdip, struct dentry *sdentry,
|
zpl_rename(struct inode *sdip, struct dentry *sdentry,
|
||||||
|
@ -757,9 +756,7 @@ const struct inode_operations zpl_dir_inode_operations = {
|
||||||
.mkdir = zpl_mkdir,
|
.mkdir = zpl_mkdir,
|
||||||
.rmdir = zpl_rmdir,
|
.rmdir = zpl_rmdir,
|
||||||
.mknod = zpl_mknod,
|
.mknod = zpl_mknod,
|
||||||
#ifdef HAVE_RENAME2
|
#if defined(HAVE_RENAME_WANTS_FLAGS) || defined(HAVE_IOPS_RENAME_USERNS)
|
||||||
.rename2 = zpl_rename2,
|
|
||||||
#elif defined(HAVE_RENAME_WANTS_FLAGS) || defined(HAVE_IOPS_RENAME_USERNS)
|
|
||||||
.rename = zpl_rename2,
|
.rename = zpl_rename2,
|
||||||
#elif defined(HAVE_IOPS_RENAME_IDMAP)
|
#elif defined(HAVE_IOPS_RENAME_IDMAP)
|
||||||
.rename = zpl_rename2,
|
.rename = zpl_rename2,
|
||||||
|
|
Loading…
Reference in New Issue