aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorTigran Mkrtchyan <kofemann@gmail.com>2012-02-13 16:55:25 -0500
committerJ. Bruce Fields <bfields@redhat.com>2012-02-15 11:20:39 -0500
commit62cd4a591c6e0ead783940169fb8d34fe3f04992 (patch)
tree149caa0d996deaa4556f3cb40cdd6d72b15b333f /fs/nfsd/nfs4state.c
parent8b70484c67cf5241cfbea0ee31b83e42e5bac163 (diff)
nfsd41: handle current stateid on lock and locku
Signed-off-by: Tigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 2604e7ea858..24eae5c1182 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 */
4713void 4716void
4714nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, struct nfsd4_open *open) 4717nfsd4_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
4719void 4722void
4723nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close)
4724{
4725 put_stateid(cstate, &close->cl_stateid);
4726}
4727
4728void
4729nfsd4_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 */
4737void
4720nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) 4738nfsd4_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
4725void 4743void
4726nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) 4744nfsd4_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}