1 AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
4 dnl # iops->rename2() merged into iops->rename(), and iops->rename() now wants
7 ZFS_LINUX_TEST_SRC([inode_operations_rename_flags], [
9 int rename_fn(struct inode *sip, struct dentry *sdp,
10 struct inode *tip, struct dentry *tdp,
11 unsigned int flags) { return 0; }
13 static const struct inode_operations
14 iops __attribute__ ((unused)) = {
20 dnl # 5.12 API change,
22 dnl # Linux 5.12 introduced passing struct user_namespace* as the first argument
23 dnl # of the rename() and other inode_operations members.
25 ZFS_LINUX_TEST_SRC([inode_operations_rename_userns], [
27 int rename_fn(struct user_namespace *user_ns, struct inode *sip,
28 struct dentry *sdp, struct inode *tip, struct dentry *tdp,
29 unsigned int flags) { return 0; }
31 static const struct inode_operations
32 iops __attribute__ ((unused)) = {
38 AC_DEFUN([ZFS_AC_KERNEL_RENAME], [
39 AC_MSG_CHECKING([whether iops->rename() takes struct user_namespace*])
40 ZFS_LINUX_TEST_RESULT([inode_operations_rename_userns], [
42 AC_DEFINE(HAVE_IOPS_RENAME_USERNS, 1,
43 [iops->rename() takes struct user_namespace*])
47 AC_MSG_CHECKING([whether iop->rename() wants flags])
48 ZFS_LINUX_TEST_RESULT([inode_operations_rename_flags], [
50 AC_DEFINE(HAVE_RENAME_WANTS_FLAGS, 1,
51 [iops->rename() wants flags])