]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd: allow reaping files still under writeback
authorJeff Layton <jlayton@kernel.org>
Wed, 15 Feb 2023 11:53:54 +0000 (06:53 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:27 +0000 (16:19 +0200)
commitb27ee0682437ce213602088b098e62e37d5d14cc
tree99fe80b8fdc7bbffaac1d5fc6026f5bc95aca00b
parent12f8f9fe1146906c5bbfa0d014e206652d11b5b4
nfsd: allow reaping files still under writeback

[ Upstream commit dcb779fcd4ed5984ad15991d574943d12a8693d1 ]

On most filesystems, there is no reason to delay reaping an nfsd_file
just because its underlying inode is still under writeback. nfsd just
relies on client activity or the local flusher threads to do writeback.

The main exception is NFS, which flushes all of its dirty data on last
close. Add a new EXPORT_OP_FLUSH_ON_CLOSE flag to allow filesystems to
signal that they do this, and only skip closing files under writeback on
such filesystems.

Also, remove a redundant NULL file pointer check in
nfsd_file_check_writeback, and clean up nfs's export op flag
definitions.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
[ cel: adjusted to apply to v5.15.y ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfs/export.c
fs/nfsd/filecache.c
include/linux/exportfs.h