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:

committed by
J. Bruce Fields

parent
9428fe1abb
commit
37c593c573
@@ -4699,15 +4699,23 @@ nfs4_state_shutdown(void)
|
||||
static void
|
||||
get_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid)
|
||||
{
|
||||
if (cstate->current_stateid && CURRENT_STATEID(stateid))
|
||||
memcpy(stateid, cstate->current_stateid, sizeof(stateid_t));
|
||||
if (HAS_STATE_ID(cstate, CURRENT_STATE_ID_FLAG) && CURRENT_STATEID(stateid))
|
||||
memcpy(stateid, &cstate->current_stateid, sizeof(stateid_t));
|
||||
}
|
||||
|
||||
static void
|
||||
put_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid)
|
||||
{
|
||||
if (cstate->minorversion)
|
||||
cstate->current_stateid = stateid;
|
||||
if (cstate->minorversion) {
|
||||
memcpy(&cstate->current_stateid, stateid, sizeof(stateid_t));
|
||||
SET_STATE_ID(cstate, CURRENT_STATE_ID_FLAG);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
clear_current_stateid(struct nfsd4_compound_state *cstate)
|
||||
{
|
||||
CLEAR_STATE_ID(cstate, CURRENT_STATE_ID_FLAG);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user