nfsd41: Make sure nfs server can distinguish client's retry RECLAIM_COMPLETE.
Subsystems (2)
PATCH 1/1 nfsd41: Make sure nfs server can distinguish client's retry RECLAIM_COMPLETE.
Make sure nfs server can distinguish client's retry RECLAIM_COMPLETE.
Signed-off-by Mi Jinlong <[email protected]>
--- fs/nfsd/nfs4state.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-)
fs/nfsd/nfs4state.c +14 -5
@@ -1804,6 +1804,8 @@ out:__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;
@@ -1813,9 +1815,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
@@ -1823,11 +1830,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
Signature · 1 line
1.7.4.1
Quoted 1 line · Mi Jinlong
Make sure nfs server can distinguish client's retry
RECLAIM_COMPLETE.
Applying for 2.6.40, thanks.--b.
Quoted 58 lines
Signed-off-by Mi Jinlong <[email protected]>--- fs/nfsd/nfs4state.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-)fs/nfsd/nfs4state.c +14
-5@@ -1804,6 +1804,8 @@ out:__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;@@ -1813,9 +1815,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 @@ -1823,11 +1830,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; } __be32Signature · 1 line
1.7.4.1