I've been trying to hunt down the bug reported here: https://bugzilla.linux-nfs.org/show_bug.cgi?id=394 I've not been able to reliably reproduce that, but patches #2 and #3 may help. The issue I think may be in the management of the sentinel reference. Responsibility for putting that reference belongs to the task that clears the HASHED flag, so we need to take care not to put that ref until we've successfully cleared it. Hopefully, this will make it a bit more consistent (and close some other potential races as well). Jeff Layton (3): nfsd: nfsd_do_file_acquire should hold rcu_read_lock while getting refs nfsd: fix potential race in nfsd_file_close nfsd: fix nfsd_file_unhash_and_dispose fs/nfsd/filecache.c | 53 ++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 32 deletions(-) -- 2.37.3