Commit 83071114 authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan Committed by J. Bruce Fields

nfsd41: save and restore current stateid with current fh

Signed-off-by: default avatarTigran Mkrtchyan <kofemann@gmail.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 80e01cc1
...@@ -453,6 +453,7 @@ nfsd4_restorefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, ...@@ -453,6 +453,7 @@ nfsd4_restorefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
return nfserr_restorefh; return nfserr_restorefh;
fh_dup2(&cstate->current_fh, &cstate->save_fh); fh_dup2(&cstate->current_fh, &cstate->save_fh);
cstate->current_stateid = cstate->save_stateid;
return nfs_ok; return nfs_ok;
} }
...@@ -464,6 +465,7 @@ nfsd4_savefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, ...@@ -464,6 +465,7 @@ nfsd4_savefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
return nfserr_nofilehandle; return nfserr_nofilehandle;
fh_dup2(&cstate->save_fh, &cstate->current_fh); fh_dup2(&cstate->save_fh, &cstate->current_fh);
cstate->save_stateid = cstate->current_stateid;
return nfs_ok; return nfs_ok;
} }
......
...@@ -55,6 +55,7 @@ struct nfsd4_compound_state { ...@@ -55,6 +55,7 @@ struct nfsd4_compound_state {
u32 minorversion; u32 minorversion;
u32 status; u32 status;
const stateid_t *current_stateid; const stateid_t *current_stateid;
const stateid_t *save_stateid;
}; };
static inline bool nfsd4_has_session(struct nfsd4_compound_state *cs) static inline bool nfsd4_has_session(struct nfsd4_compound_state *cs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment