From 257e40f9d9678e511c294ac27a68b8c46d9bab05 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 3 Aug 2024 13:22:38 +1000 Subject: [PATCH] config: remove HAVE_FILE_DENTRY 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-file-dentry.m4 | 24 ---------------------- config/kernel.m4 | 2 -- include/os/linux/kernel/linux/vfs_compat.h | 12 ----------- 3 files changed, 38 deletions(-) delete mode 100644 config/kernel-file-dentry.m4 diff --git a/config/kernel-file-dentry.m4 b/config/kernel-file-dentry.m4 deleted file mode 100644 index 9cb5869c3..000000000 --- a/config/kernel-file-dentry.m4 +++ /dev/null @@ -1,24 +0,0 @@ -dnl # -dnl # 4.1 API change -dnl # struct access file->f_path.dentry was replaced by accessor function -dnl # since fix torvalds/linux@4bacc9c9234c ("overlayfs: Make f_path always -dnl # point to the overlay and f_inode to the underlay"). -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_FILE_DENTRY], [ - ZFS_LINUX_TEST_SRC([file_dentry], [ - #include - ],[ - struct file *f = NULL; - file_dentry(f); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_FILE_DENTRY], [ - AC_MSG_CHECKING([whether file_dentry() is available]) - ZFS_LINUX_TEST_RESULT([file_dentry], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FILE_DENTRY, 1, [file_dentry() is available]) - ],[ - AC_MSG_RESULT(no) - ]) -]) diff --git a/config/kernel.m4 b/config/kernel.m4 index 4b46aa454..cd91a220c 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -75,7 +75,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_INODE_SET_IVERSION ZFS_AC_KERNEL_SRC_SHOW_OPTIONS ZFS_AC_KERNEL_SRC_FILE_INODE - ZFS_AC_KERNEL_SRC_FILE_DENTRY ZFS_AC_KERNEL_SRC_FILEMAP ZFS_AC_KERNEL_SRC_FSYNC ZFS_AC_KERNEL_SRC_AIO_FSYNC @@ -223,7 +222,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_INODE_SET_IVERSION ZFS_AC_KERNEL_SHOW_OPTIONS ZFS_AC_KERNEL_FILE_INODE - ZFS_AC_KERNEL_FILE_DENTRY ZFS_AC_KERNEL_FILEMAP ZFS_AC_KERNEL_FSYNC ZFS_AC_KERNEL_AIO_FSYNC diff --git a/include/os/linux/kernel/linux/vfs_compat.h b/include/os/linux/kernel/linux/vfs_compat.h index 6ab760169..eb4ce8880 100644 --- a/include/os/linux/kernel/linux/vfs_compat.h +++ b/include/os/linux/kernel/linux/vfs_compat.h @@ -272,18 +272,6 @@ static inline struct inode *file_inode(const struct file *f) } #endif /* HAVE_FILE_INODE */ -/* - * 4.1 API change - * struct access file->f_path.dentry was replaced by accessor function - * file_dentry(f) - */ -#ifndef HAVE_FILE_DENTRY -static inline struct dentry *file_dentry(const struct file *f) -{ - return (f->f_path.dentry); -} -#endif /* HAVE_FILE_DENTRY */ - static inline uid_t zfs_uid_read_impl(struct inode *ip) { return (from_kuid(kcred->user_ns, ip->i_uid));