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

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>
This commit is contained in:
J. Bruce Fields 2021-08-12 16:41:43 -04:00 коммит произвёл Chuck Lever
Родитель 5a47534462
Коммит f7104cc1a9
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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);