mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
nfsd41: use current stateid by value
Signed-off-by: Tigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
9428fe1abb
commit
37c593c573
4 changed files with 33 additions and 9 deletions
|
@ -453,7 +453,10 @@ nfsd4_restorefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|||
return nfserr_restorefh;
|
||||
|
||||
fh_dup2(&cstate->current_fh, &cstate->save_fh);
|
||||
cstate->current_stateid = cstate->save_stateid;
|
||||
if (HAS_STATE_ID(cstate, SAVED_STATE_ID_FLAG)) {
|
||||
memcpy(&cstate->current_stateid, &cstate->save_stateid, sizeof(stateid_t));
|
||||
SET_STATE_ID(cstate, CURRENT_STATE_ID_FLAG);
|
||||
}
|
||||
return nfs_ok;
|
||||
}
|
||||
|
||||
|
@ -465,7 +468,10 @@ nfsd4_savefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|||
return nfserr_nofilehandle;
|
||||
|
||||
fh_dup2(&cstate->save_fh, &cstate->current_fh);
|
||||
cstate->save_stateid = cstate->current_stateid;
|
||||
if (HAS_STATE_ID(cstate, CURRENT_STATE_ID_FLAG)) {
|
||||
memcpy(&cstate->save_stateid, &cstate->current_stateid, sizeof(stateid_t));
|
||||
SET_STATE_ID(cstate, SAVED_STATE_ID_FLAG);
|
||||
}
|
||||
return nfs_ok;
|
||||
}
|
||||
|
||||
|
@ -1238,7 +1244,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
|
|||
opdesc->op_set_currentstateid(cstate, &op->u);
|
||||
|
||||
if (opdesc->op_flags & OP_CLEAR_STATEID)
|
||||
cstate->current_stateid = NULL;
|
||||
clear_current_stateid(cstate);
|
||||
|
||||
if (need_wrongsec_check(rqstp))
|
||||
op->status = check_nfsd_access(cstate->current_fh.fh_export, rqstp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue