From f6cf60c3853d23fa34d06b6dd7349fe72f9d86aa Mon Sep 17 00:00:00 2001 From: Benny Halevy Date: Thu, 20 Aug 2009 03:21:56 +0300 Subject: [PATCH] --- yaml --- r: 164617 b: refs/heads/master c: aaf84eb95a9c610c6413cee4836764ea9194eed3 h: refs/heads/master i: 164615: 08563676f034c0eda6b730374fbf3d6db9bf9cb3 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4state.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 376eaf9f4968..42918dc3d711 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eac81736e6884484ebb45f8d0cba639f3285382b +refs/heads/master: aaf84eb95a9c610c6413cee4836764ea9194eed3 diff --git a/trunk/fs/nfsd/nfs4state.c b/trunk/fs/nfsd/nfs4state.c index d2a052480908..5f634d24861c 100644 --- a/trunk/fs/nfsd/nfs4state.c +++ b/trunk/fs/nfsd/nfs4state.c @@ -1481,7 +1481,7 @@ nfsd4_sequence(struct svc_rqst *rqstp, * for nfsd4_svc_encode_compoundres processing */ status = nfsd4_replay_cache_entry(resp, seq); cstate->status = nfserr_replay_cache; - goto replay_cache; + goto out; } if (status) goto out; @@ -1497,15 +1497,18 @@ nfsd4_sequence(struct svc_rqst *rqstp, cstate->slot = slot; cstate->session = session; -replay_cache: - /* Renew the clientid on success and on replay. - * Hold a session reference until done processing the compound: + /* Hold a session reference until done processing the compound: * nfsd4_put_session called only if the cstate slot is set. */ - renew_client(session->se_client); nfsd4_get_session(session); out: spin_unlock(&sessionid_lock); + /* Renew the clientid on success and on replay */ + if (cstate->session) { + nfs4_lock_state(); + renew_client(session->se_client); + nfs4_unlock_state(); + } dprintk("%s: return %d\n", __func__, ntohl(status)); return status; }