summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2021-08-12 22:41:43 +0200
committerChuck Lever <chuck.lever@oracle.com>2021-08-17 17:47:54 +0200
commitf7104cc1a9159cd0d3e8526cb638ae0301de4b61 (patch)
tree946bb6f42559a9e233ac99c3bb18d026aad2d2f8 /fs/nfsd
parentrpc: fix gss_svc_init cleanup on failure (diff)
downloadlinux-f7104cc1a9159cd0d3e8526cb638ae0301de4b61.tar.xz
linux-f7104cc1a9159cd0d3e8526cb638ae0301de4b61.zip
nfsd4: Fix forced-expiry locking
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 by 89c905beccbb. Fixes: 89c905beccbb "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>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index fa67ecd5fe63..2bedc7839ec5 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2687,9 +2687,9 @@ static void force_expire_client(struct nfs4_client *clp)
trace_nfsd_clid_admin_expired(&clp->cl_clientid);
- 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);