aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorTigran Mkrtchyan <kofemann@gmail.com>2012-02-13 16:55:30 -0500
committerJ. Bruce Fields <bfields@redhat.com>2012-02-15 11:20:43 -0500
commit1e97b5190d9538748cbf72c20a56b2c5cbd2f61d (patch)
treefe06a4c0bb2ee61511aecaf31ad3ef2ce911231c /fs/nfsd
parentd14710532ff192033450aa8ec57f7a93670d4c5f (diff)
nfsd41: handle current stateid in SETATTR and FREE_STATEID
Signed-off-by: Tigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/current_stateid.h2
-rw-r--r--fs/nfsd/nfs4proc.c1
-rw-r--r--fs/nfsd/nfs4state.c13
3 files changed, 16 insertions, 0 deletions
diff --git a/fs/nfsd/current_stateid.h b/fs/nfsd/current_stateid.h
index 6e54d19a88c3..e1ae9500e9fc 100644
--- a/fs/nfsd/current_stateid.h
+++ b/fs/nfsd/current_stateid.h
@@ -14,6 +14,8 @@ extern void nfsd4_set_closestateid(struct nfsd4_compound_state *, struct nfsd4_c
14/* 14/*
15 * functions to consume current state id 15 * functions to consume current state id
16 */ 16 */
17extern void nfsd4_get_freestateid(struct nfsd4_compound_state *, struct nfsd4_free_stateid *);
18extern void nfsd4_get_setattrstateid(struct nfsd4_compound_state *, struct nfsd4_setattr *);
17extern void nfsd4_get_closestateid(struct nfsd4_compound_state *, struct nfsd4_close *); 19extern void nfsd4_get_closestateid(struct nfsd4_compound_state *, struct nfsd4_close *);
18extern void nfsd4_get_lockustateid(struct nfsd4_compound_state *, struct nfsd4_locku *); 20extern void nfsd4_get_lockustateid(struct nfsd4_compound_state *, struct nfsd4_locku *);
19extern void nfsd4_get_readstateid(struct nfsd4_compound_state *, struct nfsd4_read *); 21extern void nfsd4_get_readstateid(struct nfsd4_compound_state *, struct nfsd4_read *);
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 421eb0980a68..d11656bdc649 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1606,6 +1606,7 @@ static struct nfsd4_operation nfsd4_ops[] = {
1606 .op_name = "OP_SETATTR", 1606 .op_name = "OP_SETATTR",
1607 .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME, 1607 .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
1608 .op_rsize_bop = (nfsd4op_rsize)nfsd4_setattr_rsize, 1608 .op_rsize_bop = (nfsd4op_rsize)nfsd4_setattr_rsize,
1609 .op_get_currentstateid = (stateid_getter)nfsd4_get_setattrstateid,
1609 }, 1610 },
1610 [OP_SETCLIENTID] = { 1611 [OP_SETCLIENTID] = {
1611 .op_func = (nfsd4op_func)nfsd4_setclientid, 1612 .op_func = (nfsd4op_func)nfsd4_setclientid,
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index e97036f32b9b..5258ac1f4cbd 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4734,6 +4734,19 @@ nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, struct nfsd4_lock *lo
4734/* 4734/*
4735 * functions to consume current state id 4735 * functions to consume current state id
4736 */ 4736 */
4737
4738void
4739nfsd4_get_freestateid(struct nfsd4_compound_state *cstate, struct nfsd4_free_stateid *fsp)
4740{
4741 get_stateid(cstate, &fsp->fr_stateid);
4742}
4743
4744void
4745nfsd4_get_setattrstateid(struct nfsd4_compound_state *cstate, struct nfsd4_setattr *setattr)
4746{
4747 get_stateid(cstate, &setattr->sa_stateid);
4748}
4749
4737void 4750void
4738nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) 4751nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close)
4739{ 4752{