1 AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
5 dnl # iops->rename2() merged into iops->rename(), and iops->rename() now
8 ZFS_LINUX_TEST_SRC([inode_operations_rename_flags], [
10 static int rename_fn(struct inode *sip, struct dentry *sdp,
11 struct inode *tip, struct dentry *tdp,
12 unsigned int flags) { return 0; }
14 static const struct inode_operations
15 iops __attribute__ ((unused)) = {
21 dnl # 5.12 API change,
23 dnl # Linux 5.12 introduced passing struct user_namespace* as the first
24 dnl # argument of the rename() and other inode_operations members.
26 ZFS_LINUX_TEST_SRC([inode_operations_rename_userns], [
28 static int rename_fn(struct user_namespace *user_ns, struct inode *sip,
29 struct dentry *sdp, struct inode *tip, struct dentry *tdp,
30 unsigned int flags) { return 0; }
32 static const struct inode_operations
33 iops __attribute__ ((unused)) = {
39 dnl # 6.3 API change - the first arg is now struct mnt_idmap*
41 ZFS_LINUX_TEST_SRC([inode_operations_rename_mnt_idmap], [
43 static int rename_fn(struct mnt_idmap *idmap, struct inode *sip,
44 struct dentry *sdp, struct inode *tip, struct dentry *tdp,
45 unsigned int flags) { return 0; }
47 static const struct inode_operations
48 iops __attribute__ ((unused)) = {
54 AC_DEFUN([ZFS_AC_KERNEL_RENAME], [
55 AC_MSG_CHECKING([whether iops->rename() takes struct mnt_idmap*])
56 ZFS_LINUX_TEST_RESULT([inode_operations_rename_mnt_idmap], [
58 AC_DEFINE(HAVE_IOPS_RENAME_IDMAP, 1,
59 [iops->rename() takes struct mnt_idmap*])
63 AC_MSG_CHECKING([whether iops->rename() takes struct user_namespace*])
64 ZFS_LINUX_TEST_RESULT([inode_operations_rename_userns], [
66 AC_DEFINE(HAVE_IOPS_RENAME_USERNS, 1,
67 [iops->rename() takes struct user_namespace*])
71 AC_MSG_CHECKING([whether iops->rename() wants flags])
72 ZFS_LINUX_TEST_RESULT([inode_operations_rename_flags], [
74 AC_DEFINE(HAVE_RENAME_WANTS_FLAGS, 1,
75 [iops->rename() wants flags])