Commit 1e97b519 authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan Committed by J. Bruce Fields

nfsd41: handle current stateid in SETATTR and FREE_STATEID

Signed-off-by: default avatarTigran Mkrtchyan <kofemann@gmail.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent d1471053
...@@ -14,6 +14,8 @@ extern void nfsd4_set_closestateid(struct nfsd4_compound_state *, struct nfsd4_c ...@@ -14,6 +14,8 @@ extern void nfsd4_set_closestateid(struct nfsd4_compound_state *, struct nfsd4_c
/* /*
* functions to consume current state id * 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_closestateid(struct nfsd4_compound_state *, struct nfsd4_close *);
extern void nfsd4_get_lockustateid(struct nfsd4_compound_state *, struct nfsd4_locku *); extern void nfsd4_get_lockustateid(struct nfsd4_compound_state *, struct nfsd4_locku *);
extern void nfsd4_get_readstateid(struct nfsd4_compound_state *, struct nfsd4_read *); extern void nfsd4_get_readstateid(struct nfsd4_compound_state *, struct nfsd4_read *);
......
...@@ -1606,6 +1606,7 @@ static struct nfsd4_operation nfsd4_ops[] = { ...@@ -1606,6 +1606,7 @@ static struct nfsd4_operation nfsd4_ops[] = {
.op_name = "OP_SETATTR", .op_name = "OP_SETATTR",
.op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME, .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
.op_rsize_bop = (nfsd4op_rsize)nfsd4_setattr_rsize, .op_rsize_bop = (nfsd4op_rsize)nfsd4_setattr_rsize,
.op_get_currentstateid = (stateid_getter)nfsd4_get_setattrstateid,
}, },
[OP_SETCLIENTID] = { [OP_SETCLIENTID] = {
.op_func = (nfsd4op_func)nfsd4_setclientid, .op_func = (nfsd4op_func)nfsd4_setclientid,
......
...@@ -4734,6 +4734,19 @@ nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, struct nfsd4_lock *lo ...@@ -4734,6 +4734,19 @@ nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, struct nfsd4_lock *lo
/* /*
* functions to consume current state id * 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 void
nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment