Commit f7104cc1 authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Chuck Lever

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 89c905be.

Fixes: 89c905be "nfsd: allow forced expiration of NFSv4 clients"
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 5a475344
...@@ -2687,9 +2687,9 @@ static void force_expire_client(struct nfs4_client *clp) ...@@ -2687,9 +2687,9 @@ static void force_expire_client(struct nfs4_client *clp)
trace_nfsd_clid_admin_expired(&clp->cl_clientid); trace_nfsd_clid_admin_expired(&clp->cl_clientid);
spin_lock(&clp->cl_lock); spin_lock(&nn->client_lock);
clp->cl_time = 0; 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); wait_event(expiry_wq, atomic_read(&clp->cl_rpc_users) == 0);
spin_lock(&nn->client_lock); spin_lock(&nn->client_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment