From 714d7666e55aba02c5e2f2ff032c655ae2c7e7a3 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 3 Aug 2024 13:29:51 +1000 Subject: [PATCH] config: remove HAVE_INODE_SET_FLAGS Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Reviewed-by: Tino Reichardt Signed-off-by: Rob Norris Closes #16479 --- config/kernel-inode-set-flags.m4 | 22 ---------------------- config/kernel.m4 | 2 -- module/os/linux/zfs/zfs_znode.c | 12 ------------ 3 files changed, 36 deletions(-) delete mode 100644 config/kernel-inode-set-flags.m4 diff --git a/config/kernel-inode-set-flags.m4 b/config/kernel-inode-set-flags.m4 deleted file mode 100644 index 133f666a9..000000000 --- a/config/kernel-inode-set-flags.m4 +++ /dev/null @@ -1,22 +0,0 @@ -dnl # -dnl # 3.15 API change -dnl # inode_set_flags introduced to set i_flags -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SET_FLAGS], [ - ZFS_LINUX_TEST_SRC([inode_set_flags], [ - #include - ],[ - struct inode inode; - inode_set_flags(&inode, S_IMMUTABLE, S_IMMUTABLE); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_INODE_SET_FLAGS], [ - AC_MSG_CHECKING([whether inode_set_flags() exists]) - ZFS_LINUX_TEST_RESULT([inode_set_flags], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INODE_SET_FLAGS, 1, [inode_set_flags() exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) diff --git a/config/kernel.m4 b/config/kernel.m4 index f9c98c818..c9d734bec 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -71,7 +71,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_ACL ZFS_AC_KERNEL_SRC_INODE_SETATTR ZFS_AC_KERNEL_SRC_INODE_GETATTR - ZFS_AC_KERNEL_SRC_INODE_SET_FLAGS ZFS_AC_KERNEL_SRC_INODE_SET_IVERSION ZFS_AC_KERNEL_SRC_SHOW_OPTIONS ZFS_AC_KERNEL_SRC_FILEMAP @@ -215,7 +214,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_ACL ZFS_AC_KERNEL_INODE_SETATTR ZFS_AC_KERNEL_INODE_GETATTR - ZFS_AC_KERNEL_INODE_SET_FLAGS ZFS_AC_KERNEL_INODE_SET_IVERSION ZFS_AC_KERNEL_SHOW_OPTIONS ZFS_AC_KERNEL_FILEMAP diff --git a/module/os/linux/zfs/zfs_znode.c b/module/os/linux/zfs/zfs_znode.c index 265153e01..24aee0b88 100644 --- a/module/os/linux/zfs/zfs_znode.c +++ b/module/os/linux/zfs/zfs_znode.c @@ -476,7 +476,6 @@ zfs_set_inode_flags(znode_t *zp, struct inode *ip) * Linux and Solaris have different sets of file attributes, so we * restrict this conversion to the intersection of the two. */ -#ifdef HAVE_INODE_SET_FLAGS unsigned int flags = 0; if (zp->z_pflags & ZFS_IMMUTABLE) flags |= S_IMMUTABLE; @@ -484,17 +483,6 @@ zfs_set_inode_flags(znode_t *zp, struct inode *ip) flags |= S_APPEND; inode_set_flags(ip, flags, S_IMMUTABLE|S_APPEND); -#else - if (zp->z_pflags & ZFS_IMMUTABLE) - ip->i_flags |= S_IMMUTABLE; - else - ip->i_flags &= ~S_IMMUTABLE; - - if (zp->z_pflags & ZFS_APPENDONLY) - ip->i_flags |= S_APPEND; - else - ip->i_flags &= ~S_APPEND; -#endif } /*