Skip to content

exportfs: Release the get_name() directory file synchronously - #2805

Closed
vfsci-bot[bot] wants to merge 1 commit into
vfs.base.cifrom
pw/1181018/vfs.base.ci
Closed

vfsci-bot[bot] wants to merge 1 commit into
vfs.base.cifrom
pw/1181018/vfs.base.ci

Conversation

@vfsci-bot

@vfsci-bot vfsci-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown

Series: https://patchwork.kernel.org/project/linux-fsdevel/list/?series=1181018
Submitter: Chuck Lever
Version: 1
Patches: 1/1
Message-ID: <20261007164648.50493-1-cel@kernel.org>
Base: vfs.base.ci
Lore: https://lore.kernel.org/linux-fsdevel/20261007164648.50493-1-cel@kernel.org


Automated by ml2pr

get_name() opens the parent directory with dentry_open() and
releases it with fput(). From a kernel thread, fput() defers the
final __fput() to the delayed_fput work item. NFSD threads are
kernel threads, and NFSD reaches get_name() through
exportfs_decode_fh() whenever a file handle's dentry is not
connected to the root.

On a filesystem with more directories than the dcache retains,
nearly every READDIRPLUS needs a reconnect. The deferred releases
arrive faster than the work item retires them, and each pending
file pins the directory's readdir state. On ext4 that state is the
htree fname cache for the last leaf block read. A 64-thread NFSv3
server under a parallel tree walk showed unreclaimable slab growing
by about 90 MB per second, and the same workload on a 5.15 kernel
ended in a global OOM.

Commit 5ff318f ("nfsd: use __fput_sync() to avoid delayed
closing of files.") stopped NFSD's own closes from feeding the
delayed_fput queue but did not cover the exportfs reconnect path.

Release the file with __fput_sync(). get_name() opened the file
itself, read-only, on a directory, so __fput() involves nothing
that could wait on the caller.

Fixes: 4a9d4b0 ("switch fput to task_work_add")
Reported-by: Danny Pidutti <danny_pidutti@hotmail.com>
Closes: https://lore.kernel.org/linux-fsdevel/DS4PR04MB9846BA3C16BC5ACED8B589228D952@DS4PR04MB9846.namprd04.prod.outlook.com/
Signed-off-by: Chuck Lever <cel@kernel.org>
Reviewed-by: Benjamin Coddington <bcodding@hammerspace.com>
@vfsci-bot

vfsci-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown
Author

Superseded by series 1180999 (v1). Closing automatically.


Automated by ml2pr

@vfsci-bot vfsci-bot Bot closed this Oct 8, 2026
@vfsci-bot
vfsci-bot Bot deleted the pw/1181018/vfs.base.ci branch October 8, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant