config: remove HAVE_TMPFILE

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #16479
This commit is contained in:
Rob Norris 2024-08-24 21:09:43 +10:00 committed by Brian Behlendorf
parent 2de203163d
commit de10132c34
3 changed files with 2 additions and 10 deletions

View File

@ -59,23 +59,19 @@ AC_DEFUN([ZFS_AC_KERNEL_TMPFILE], [
AC_MSG_CHECKING([whether i_op->tmpfile() exists]) AC_MSG_CHECKING([whether i_op->tmpfile() exists])
ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_mnt_idmap], [ ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_mnt_idmap], [
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
AC_DEFINE(HAVE_TMPFILE_IDMAP, 1, [i_op->tmpfile() has mnt_idmap]) AC_DEFINE(HAVE_TMPFILE_IDMAP, 1, [i_op->tmpfile() has mnt_idmap])
], [ ], [
ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile], [ ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile], [
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns]) AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns])
],[ ],[
ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_dentry_userns], [ ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_dentry_userns], [
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns]) AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns])
AC_DEFINE(HAVE_TMPFILE_DENTRY, 1, [i_op->tmpfile() uses old dentry signature]) AC_DEFINE(HAVE_TMPFILE_DENTRY, 1, [i_op->tmpfile() uses old dentry signature])
],[ ],[
ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_dentry], [ ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_dentry], [
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
AC_DEFINE(HAVE_TMPFILE_DENTRY, 1, [i_op->tmpfile() uses old dentry signature]) AC_DEFINE(HAVE_TMPFILE_DENTRY, 1, [i_op->tmpfile() uses old dentry signature])
],[ ],[
ZFS_LINUX_REQUIRE_API([i_op->tmpfile()], [3.11]) ZFS_LINUX_REQUIRE_API([i_op->tmpfile()], [3.11])

View File

@ -3461,9 +3461,9 @@ zfs_link(znode_t *tdzp, znode_t *szp, char *name, cred_t *cr,
boolean_t waited = B_FALSE; boolean_t waited = B_FALSE;
boolean_t is_tmpfile = 0; boolean_t is_tmpfile = 0;
uint64_t txg; uint64_t txg;
#ifdef HAVE_TMPFILE
is_tmpfile = (sip->i_nlink == 0 && (sip->i_state & I_LINKABLE)); is_tmpfile = (sip->i_nlink == 0 && (sip->i_state & I_LINKABLE));
#endif
ASSERT(S_ISDIR(ZTOI(tdzp)->i_mode)); ASSERT(S_ISDIR(ZTOI(tdzp)->i_mode));
if (name == NULL) if (name == NULL)

View File

@ -238,7 +238,6 @@ zpl_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
return (error); return (error);
} }
#ifdef HAVE_TMPFILE
static int static int
#ifdef HAVE_TMPFILE_IDMAP #ifdef HAVE_TMPFILE_IDMAP
zpl_tmpfile(struct mnt_idmap *userns, struct inode *dir, zpl_tmpfile(struct mnt_idmap *userns, struct inode *dir,
@ -307,7 +306,6 @@ zpl_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
return (error); return (error);
} }
#endif
static int static int
zpl_unlink(struct inode *dir, struct dentry *dentry) zpl_unlink(struct inode *dir, struct dentry *dentry)
@ -763,9 +761,7 @@ const struct inode_operations zpl_dir_inode_operations = {
#else #else
.rename = zpl_rename, .rename = zpl_rename,
#endif #endif
#ifdef HAVE_TMPFILE
.tmpfile = zpl_tmpfile, .tmpfile = zpl_tmpfile,
#endif
.setattr = zpl_setattr, .setattr = zpl_setattr,
.getattr = zpl_getattr, .getattr = zpl_getattr,
.listxattr = zpl_xattr_list, .listxattr = zpl_xattr_list,