From 7a02229293a70cc9625b8baf3cd3d171d8bbd19b Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 24 Aug 2024 21:43:41 +1000 Subject: [PATCH] config: remove HAVE_VFSMOUNT_IOPS_GETATTR 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-getattr.m4 | 26 ---------------------- include/os/linux/kernel/linux/vfs_compat.h | 11 +-------- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/config/kernel-inode-getattr.m4 b/config/kernel-inode-getattr.m4 index 5f7ce1ad9a5d..73b8213109fb 100644 --- a/config/kernel-inode-getattr.m4 +++ b/config/kernel-inode-getattr.m4 @@ -57,20 +57,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [ .getattr = test_getattr, }; ],[]) - - ZFS_LINUX_TEST_SRC([inode_operations_getattr_vfsmount], [ - #include - - static int test_getattr( - struct vfsmount *mnt, struct dentry *d, - struct kstat *k) - { return 0; } - - static const struct inode_operations - iops __attribute__ ((unused)) = { - .getattr = test_getattr, - }; - ],[]) ]) AC_DEFUN([ZFS_AC_KERNEL_INODE_GETATTR], [ @@ -105,18 +91,6 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_GETATTR], [ [iops->getattr() takes a path]) ],[ AC_MSG_RESULT(no) - - dnl # - dnl # Kernel < 4.11 test - dnl # - AC_MSG_CHECKING([whether iops->getattr() takes a vfsmount]) - ZFS_LINUX_TEST_RESULT([inode_operations_getattr_vfsmount], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_VFSMOUNT_IOPS_GETATTR, 1, - [iops->getattr() takes a vfsmount]) - ],[ - AC_MSG_RESULT(no) - ]) ]) ]) ]) diff --git a/include/os/linux/kernel/linux/vfs_compat.h b/include/os/linux/kernel/linux/vfs_compat.h index 3caa61ec514f..075b9e111b10 100644 --- a/include/os/linux/kernel/linux/vfs_compat.h +++ b/include/os/linux/kernel/linux/vfs_compat.h @@ -187,16 +187,7 @@ setattr_prepare(struct dentry *dentry, struct iattr *ia) * 4.11 takes struct path *, < 4.11 takes vfsmount * */ -#ifdef HAVE_VFSMOUNT_IOPS_GETATTR -#define ZPL_GETATTR_WRAPPER(func) \ -static int \ -func(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) \ -{ \ - struct path path = { .mnt = mnt, .dentry = dentry }; \ - return func##_impl(&path, stat, STATX_BASIC_STATS, \ - AT_STATX_SYNC_AS_STAT); \ -} -#elif defined(HAVE_PATH_IOPS_GETATTR) +#if defined(HAVE_PATH_IOPS_GETATTR) #define ZPL_GETATTR_WRAPPER(func) \ static int \ func(const struct path *path, struct kstat *stat, u32 request_mask, \