From ebbbc1c8707fc9c149ee9183c37442111fe769d5 Mon Sep 17 00:00:00 2001 From: Mi Jinlong Date: Wed, 27 Apr 2011 09:14:30 +0800 Subject: [PATCH] --- yaml --- r: 252825 b: refs/heads/master c: bcecf1ccc336200ee488e8eb68acdafc4b0dbd1a h: refs/heads/master i: 252823: 3ce15c1c285ef57bb7a82b76efb1f9b470c75f7a v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4state.c | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index a9c2f196209e..3e944bb51f7d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 868b89c3dc25eec03985b31ff070e8f73c818980 +refs/heads/master: bcecf1ccc336200ee488e8eb68acdafc4b0dbd1a diff --git a/trunk/fs/nfsd/nfs4state.c b/trunk/fs/nfsd/nfs4state.c index 3196dc388578..2bb03f86a037 100644 --- a/trunk/fs/nfsd/nfs4state.c +++ b/trunk/fs/nfsd/nfs4state.c @@ -1818,6 +1818,8 @@ nfsd4_sequence(struct svc_rqst *rqstp, __be32 nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_reclaim_complete *rc) { + int status = 0; + if (rc->rca_one_fs) { if (!cstate->current_fh.fh_dentry) return nfserr_nofilehandle; @@ -1827,9 +1829,14 @@ nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *csta */ return nfs_ok; } + nfs4_lock_state(); - if (is_client_expired(cstate->session->se_client)) { - nfs4_unlock_state(); + status = nfserr_complete_already; + if (cstate->session->se_client->cl_firststate) + goto out; + + status = nfserr_stale_clientid; + if (is_client_expired(cstate->session->se_client)) /* * The following error isn't really legal. * But we only get here if the client just explicitly @@ -1837,11 +1844,13 @@ nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *csta * error it gets back on an operation for the dead * client. */ - return nfserr_stale_clientid; - } + goto out; + + status = nfs_ok; nfsd4_create_clid_dir(cstate->session->se_client); +out: nfs4_unlock_state(); - return nfs_ok; + return status; } __be32