From 64a3690b2cc9d9566ba4d8c691fc3b17d7273ab6 Mon Sep 17 00:00:00 2001 From: Tigran Mkrtchyan Date: Mon, 13 Feb 2012 22:55:30 +0100 Subject: [PATCH] --- yaml --- r: 297435 b: refs/heads/master c: 1e97b5190d9538748cbf72c20a56b2c5cbd2f61d h: refs/heads/master i: 297433: 9c1fbba4e91be6de123e96321f7247bf22e5c960 297431: 78ec53b2c54977868a1a35de900c3d7c3b236018 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/current_stateid.h | 2 ++ trunk/fs/nfsd/nfs4proc.c | 1 + trunk/fs/nfsd/nfs4state.c | 13 +++++++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index b0c35b7d3eb7..48a5549985ea 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d14710532ff192033450aa8ec57f7a93670d4c5f +refs/heads/master: 1e97b5190d9538748cbf72c20a56b2c5cbd2f61d diff --git a/trunk/fs/nfsd/current_stateid.h b/trunk/fs/nfsd/current_stateid.h index 6e54d19a88c3..e1ae9500e9fc 100644 --- a/trunk/fs/nfsd/current_stateid.h +++ b/trunk/fs/nfsd/current_stateid.h @@ -14,6 +14,8 @@ extern void nfsd4_set_closestateid(struct nfsd4_compound_state *, struct nfsd4_c /* * functions to consume current state id */ +extern void nfsd4_get_freestateid(struct nfsd4_compound_state *, struct nfsd4_free_stateid *); +extern void nfsd4_get_setattrstateid(struct nfsd4_compound_state *, struct nfsd4_setattr *); extern void nfsd4_get_closestateid(struct nfsd4_compound_state *, struct nfsd4_close *); extern void nfsd4_get_lockustateid(struct nfsd4_compound_state *, struct nfsd4_locku *); extern void nfsd4_get_readstateid(struct nfsd4_compound_state *, struct nfsd4_read *); diff --git a/trunk/fs/nfsd/nfs4proc.c b/trunk/fs/nfsd/nfs4proc.c index 421eb0980a68..d11656bdc649 100644 --- a/trunk/fs/nfsd/nfs4proc.c +++ b/trunk/fs/nfsd/nfs4proc.c @@ -1606,6 +1606,7 @@ static struct nfsd4_operation nfsd4_ops[] = { .op_name = "OP_SETATTR", .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME, .op_rsize_bop = (nfsd4op_rsize)nfsd4_setattr_rsize, + .op_get_currentstateid = (stateid_getter)nfsd4_get_setattrstateid, }, [OP_SETCLIENTID] = { .op_func = (nfsd4op_func)nfsd4_setclientid, diff --git a/trunk/fs/nfsd/nfs4state.c b/trunk/fs/nfsd/nfs4state.c index e97036f32b9b..5258ac1f4cbd 100644 --- a/trunk/fs/nfsd/nfs4state.c +++ b/trunk/fs/nfsd/nfs4state.c @@ -4734,6 +4734,19 @@ nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, struct nfsd4_lock *lo /* * functions to consume current state id */ + +void +nfsd4_get_freestateid(struct nfsd4_compound_state *cstate, struct nfsd4_free_stateid *fsp) +{ + get_stateid(cstate, &fsp->fr_stateid); +} + +void +nfsd4_get_setattrstateid(struct nfsd4_compound_state *cstate, struct nfsd4_setattr *setattr) +{ + get_stateid(cstate, &setattr->sa_stateid); +} + void nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) {