]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFSv4: nfs4_do_open() is incorrectly triggering state recovery
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 24 Feb 2024 20:59:28 +0000 (15:59 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 9 Mar 2024 14:14:51 +0000 (09:14 -0500)
commit0460253913e50a2aec911fe83090d60397f17664
tree516ae74bb5674b684efd4968a28635da1462bf65
parent2fdbc20036acda9e5694db74a032d3c605323005
NFSv4: nfs4_do_open() is incorrectly triggering state recovery

We're seeing spurious calls to nfs4_schedule_stateid_recovery() from
nfs4_do_open() in situations where there is no trigger coming from the
server.
In theory the code path being triggered is supposed to notice that state
recovery happened while we were processing the open call result from the
server, before the open stateid is published. However in the years since
that code was added, we've also added the 'session draining' mechanism,
which ensures that the state recovery will wait until all the session
slots have been returned. In nfs4_do_open() the session slot is only
returned on exit of the function, so we don't need the legacy mechanism.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/delegation.c
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c