From a0548295797fe68538bd2086934e344b2b2a33ab Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 3 Aug 2024 12:57:21 +1000 Subject: [PATCH] config: remove HAVE_DIRTY_INODE_WITH_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-dirty-inode.m4 | 29 ----------------------------- config/kernel.m4 | 2 -- module/os/linux/zfs/zpl_super.c | 12 ------------ 3 files changed, 43 deletions(-) delete mode 100644 config/kernel-dirty-inode.m4 diff --git a/config/kernel-dirty-inode.m4 b/config/kernel-dirty-inode.m4 deleted file mode 100644 index 2ef865874..000000000 --- a/config/kernel-dirty-inode.m4 +++ /dev/null @@ -1,29 +0,0 @@ -dnl # -dnl # 3.0 API change -dnl # The sops->dirty_inode() callbacks were updated to take a flags -dnl # argument. This allows the greater control over whether the -dnl # filesystem needs to push out a transaction or not. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_DIRTY_INODE], [ - ZFS_LINUX_TEST_SRC([dirty_inode_with_flags], [ - #include - - static void dirty_inode(struct inode *a, int b) { return; } - - static const struct super_operations - sops __attribute__ ((unused)) = { - .dirty_inode = dirty_inode, - }; - ],[]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_DIRTY_INODE], [ - AC_MSG_CHECKING([whether sops->dirty_inode() wants flags]) - ZFS_LINUX_TEST_RESULT([dirty_inode_with_flags], [ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_DIRTY_INODE_WITH_FLAGS, 1, - [sops->dirty_inode() wants flags]) - ],[ - AC_MSG_RESULT([no]) - ]) -]) diff --git a/config/kernel.m4 b/config/kernel.m4 index f9dab8fbe..8b711e972 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -79,7 +79,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_FILE_DENTRY ZFS_AC_KERNEL_SRC_FSYNC ZFS_AC_KERNEL_SRC_AIO_FSYNC - ZFS_AC_KERNEL_SRC_DIRTY_INODE ZFS_AC_KERNEL_SRC_SHRINKER ZFS_AC_KERNEL_SRC_MKDIR ZFS_AC_KERNEL_SRC_LOOKUP_FLAGS @@ -228,7 +227,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_FILE_DENTRY ZFS_AC_KERNEL_FSYNC ZFS_AC_KERNEL_AIO_FSYNC - ZFS_AC_KERNEL_DIRTY_INODE ZFS_AC_KERNEL_SHRINKER ZFS_AC_KERNEL_MKDIR ZFS_AC_KERNEL_LOOKUP_FLAGS diff --git a/module/os/linux/zfs/zpl_super.c b/module/os/linux/zfs/zpl_super.c index d98d32c1f..66014eb87 100644 --- a/module/os/linux/zfs/zpl_super.c +++ b/module/os/linux/zfs/zpl_super.c @@ -54,7 +54,6 @@ zpl_inode_destroy(struct inode *ip) * inode has changed. We use it to ensure the znode system attributes * are always strictly update to date with respect to the inode. */ -#ifdef HAVE_DIRTY_INODE_WITH_FLAGS static void zpl_dirty_inode(struct inode *ip, int flags) { @@ -64,17 +63,6 @@ zpl_dirty_inode(struct inode *ip, int flags) zfs_dirty_inode(ip, flags); spl_fstrans_unmark(cookie); } -#else -static void -zpl_dirty_inode(struct inode *ip) -{ - fstrans_cookie_t cookie; - - cookie = spl_fstrans_mark(); - zfs_dirty_inode(ip, 0); - spl_fstrans_unmark(cookie); -} -#endif /* HAVE_DIRTY_INODE_WITH_FLAGS */ /* * When ->drop_inode() is called its return value indicates if the