diff options
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 2604e7ea8582..24eae5c11820 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -4710,6 +4710,9 @@ put_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid) | |||
4710 | cstate->current_stateid = stateid; | 4710 | cstate->current_stateid = stateid; |
4711 | } | 4711 | } |
4712 | 4712 | ||
4713 | /* | ||
4714 | * functions to set current state id | ||
4715 | */ | ||
4713 | void | 4716 | void |
4714 | nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, struct nfsd4_open *open) | 4717 | nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, struct nfsd4_open *open) |
4715 | { | 4718 | { |
@@ -4717,13 +4720,28 @@ nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, struct nfsd4_open *op | |||
4717 | } | 4720 | } |
4718 | 4721 | ||
4719 | void | 4722 | void |
4723 | nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) | ||
4724 | { | ||
4725 | put_stateid(cstate, &close->cl_stateid); | ||
4726 | } | ||
4727 | |||
4728 | void | ||
4729 | nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, struct nfsd4_lock *lock) | ||
4730 | { | ||
4731 | put_stateid(cstate, &lock->lk_resp_stateid); | ||
4732 | } | ||
4733 | |||
4734 | /* | ||
4735 | * functions to consume current state id | ||
4736 | */ | ||
4737 | void | ||
4720 | nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) | 4738 | nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) |
4721 | { | 4739 | { |
4722 | get_stateid(cstate, &close->cl_stateid); | 4740 | get_stateid(cstate, &close->cl_stateid); |
4723 | } | 4741 | } |
4724 | 4742 | ||
4725 | void | 4743 | void |
4726 | nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) | 4744 | nfsd4_get_lockustateid(struct nfsd4_compound_state *cstate, struct nfsd4_locku *locku) |
4727 | { | 4745 | { |
4728 | get_stateid(cstate, &close->cl_stateid); | 4746 | get_stateid(cstate, &locku->lu_stateid); |
4729 | } | 4747 | } |