diff options
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index d2a052480908..5f634d24861c 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1481,7 +1481,7 @@ nfsd4_sequence(struct svc_rqst *rqstp, | |||
1481 | * for nfsd4_svc_encode_compoundres processing */ | 1481 | * for nfsd4_svc_encode_compoundres processing */ |
1482 | status = nfsd4_replay_cache_entry(resp, seq); | 1482 | status = nfsd4_replay_cache_entry(resp, seq); |
1483 | cstate->status = nfserr_replay_cache; | 1483 | cstate->status = nfserr_replay_cache; |
1484 | goto replay_cache; | 1484 | goto out; |
1485 | } | 1485 | } |
1486 | if (status) | 1486 | if (status) |
1487 | goto out; | 1487 | goto out; |
@@ -1497,15 +1497,18 @@ nfsd4_sequence(struct svc_rqst *rqstp, | |||
1497 | cstate->slot = slot; | 1497 | cstate->slot = slot; |
1498 | cstate->session = session; | 1498 | cstate->session = session; |
1499 | 1499 | ||
1500 | replay_cache: | 1500 | /* Hold a session reference until done processing the compound: |
1501 | /* Renew the clientid on success and on replay. | ||
1502 | * Hold a session reference until done processing the compound: | ||
1503 | * nfsd4_put_session called only if the cstate slot is set. | 1501 | * nfsd4_put_session called only if the cstate slot is set. |
1504 | */ | 1502 | */ |
1505 | renew_client(session->se_client); | ||
1506 | nfsd4_get_session(session); | 1503 | nfsd4_get_session(session); |
1507 | out: | 1504 | out: |
1508 | spin_unlock(&sessionid_lock); | 1505 | spin_unlock(&sessionid_lock); |
1506 | /* Renew the clientid on success and on replay */ | ||
1507 | if (cstate->session) { | ||
1508 | nfs4_lock_state(); | ||
1509 | renew_client(session->se_client); | ||
1510 | nfs4_unlock_state(); | ||
1511 | } | ||
1509 | dprintk("%s: return %d\n", __func__, ntohl(status)); | 1512 | dprintk("%s: return %d\n", __func__, ntohl(status)); |
1510 | return status; | 1513 | return status; |
1511 | } | 1514 | } |