FIXME: until we work out the state locking so we can use a spin lock to protect the cl_lru we need to take the state_lock to renew the client. Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx> --- Bruce, please add this patch to the nfsd41-for-2.6.31 series. Also availble on git://linux-nfs.org/~bhalevy/linux-pnfs.git nfsd41-for-2.6.31 fs/nfsd/nfs4state.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index e21da54..c845365 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1443,10 +1443,12 @@ 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; - } - if (status) goto out; + } + if (status) { + spin_unlock(&sessionid_lock); + goto err; + } /* Success! bump slot seqid */ slot->sl_inuse = true; @@ -1462,11 +1464,13 @@ nfsd4_sequence(struct svc_rqst *rqstp, /* Hold a session reference until done caching the response */ nfsd4_get_session(session); -replay_cache: - /* Renew the clientid on success and on replay */ - renew_client(session->se_client); out: spin_unlock(&sessionid_lock); + /* Renew the clientid on success and on replay */ + nfs4_lock_state(); + renew_client(session->se_client); + nfs4_unlock_state(); +err: dprintk("%s: return %d\n", __func__, ntohl(status)); return status; } -- 1.6.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html