mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
linux/kmem: remove PF_FSTRANS and PF_MEMALLOC_NOIO compat
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #17551
This commit is contained in:
committed by
Brian Behlendorf
parent
cecff09faa
commit
96d20d7d59
@@ -260,24 +260,12 @@ zfs_file_fsync(zfs_file_t *filp, int flags)
|
||||
{
|
||||
int datasync = 0;
|
||||
int error;
|
||||
int fstrans;
|
||||
|
||||
if (flags & O_DSYNC)
|
||||
datasync = 1;
|
||||
|
||||
/*
|
||||
* May enter XFS which generates a warning when PF_FSTRANS is set.
|
||||
* To avoid this the flag is cleared over vfs_sync() and then reset.
|
||||
*/
|
||||
fstrans = __spl_pf_fstrans_check();
|
||||
if (fstrans)
|
||||
current->flags &= ~(__SPL_PF_FSTRANS);
|
||||
|
||||
error = -vfs_fsync(filp, datasync);
|
||||
|
||||
if (fstrans)
|
||||
current->flags |= __SPL_PF_FSTRANS;
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
@@ -291,14 +279,6 @@ zfs_file_fsync(zfs_file_t *filp, int flags)
|
||||
int
|
||||
zfs_file_deallocate(zfs_file_t *fp, loff_t offset, loff_t len)
|
||||
{
|
||||
/*
|
||||
* May enter XFS which generates a warning when PF_FSTRANS is set.
|
||||
* To avoid this the flag is cleared over vfs_sync() and then reset.
|
||||
*/
|
||||
int fstrans = __spl_pf_fstrans_check();
|
||||
if (fstrans)
|
||||
current->flags &= ~(__SPL_PF_FSTRANS);
|
||||
|
||||
/*
|
||||
* When supported by the underlying file system preferentially
|
||||
* use the fallocate() callback to preallocate the space.
|
||||
@@ -308,9 +288,6 @@ zfs_file_deallocate(zfs_file_t *fp, loff_t offset, loff_t len)
|
||||
error = -fp->f_op->fallocate(fp,
|
||||
FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, offset, len);
|
||||
|
||||
if (fstrans)
|
||||
current->flags |= __SPL_PF_FSTRANS;
|
||||
|
||||
if (error)
|
||||
return (SET_ERROR(error));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user