diff options
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 68383b09c7dc..f9d077d800ee 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -3451,13 +3451,17 @@ static __be32 lookup_clientid(clientid_t *clid, | |||
3451 | * will be false. | 3451 | * will be false. |
3452 | */ | 3452 | */ |
3453 | WARN_ON_ONCE(cstate->session); | 3453 | WARN_ON_ONCE(cstate->session); |
3454 | spin_lock(&nn->client_lock); | ||
3454 | found = find_confirmed_client(clid, false, nn); | 3455 | found = find_confirmed_client(clid, false, nn); |
3455 | if (!found) | 3456 | if (!found) { |
3457 | spin_unlock(&nn->client_lock); | ||
3456 | return nfserr_expired; | 3458 | return nfserr_expired; |
3459 | } | ||
3460 | atomic_inc(&found->cl_refcount); | ||
3461 | spin_unlock(&nn->client_lock); | ||
3457 | 3462 | ||
3458 | /* Cache the nfs4_client in cstate! */ | 3463 | /* Cache the nfs4_client in cstate! */ |
3459 | cstate->clp = found; | 3464 | cstate->clp = found; |
3460 | atomic_inc(&found->cl_refcount); | ||
3461 | return nfs_ok; | 3465 | return nfs_ok; |
3462 | } | 3466 | } |
3463 | 3467 | ||