mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
nfsd4: Fix forced-expiry locking
[ Upstream commitf7104cc1a9
] This should use the network-namespace-wide client_lock, not the per-client cl_lock. You shouldn't see any bugs unless you're actually using the forced-expiry interface introduced by89c905becc
. Fixes:89c905becc
"nfsd: allow forced expiration of NFSv4 clients" Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
81e69d3fdd
commit
eb3c6a2501
1 changed files with 2 additions and 2 deletions
|
@ -2572,9 +2572,9 @@ static void force_expire_client(struct nfs4_client *clp)
|
|||
struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
|
||||
bool already_expired;
|
||||
|
||||
spin_lock(&clp->cl_lock);
|
||||
spin_lock(&nn->client_lock);
|
||||
clp->cl_time = 0;
|
||||
spin_unlock(&clp->cl_lock);
|
||||
spin_unlock(&nn->client_lock);
|
||||
|
||||
wait_event(expiry_wq, atomic_read(&clp->cl_rpc_users) == 0);
|
||||
spin_lock(&nn->client_lock);
|
||||
|
|
Loading…
Reference in a new issue