aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2016-08-16 13:29:27 -0400
committerJ. Bruce Fields <bfields@redhat.com>2016-09-16 16:15:52 -0400
commit89dfdc964bb4b2112c2cd058412f49d9906c9d35 (patch)
treeffad26029985bd0803e09e0cd9c424d5a9cd0a40
parent1983a66f575bed05ef63a15193246758055c50b2 (diff)
nfsd: eliminate cb_minorversion field
We already have that info in the client pointer. No need to pass around a copy. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--fs/nfsd/nfs4callback.c7
-rw-r--r--fs/nfsd/state.h1
2 files changed, 3 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 04c68d900324..dbef646c6a2d 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -448,7 +448,7 @@ static int decode_cb_sequence4res(struct xdr_stream *xdr,
448{ 448{
449 int status; 449 int status;
450 450
451 if (cb->cb_minorversion == 0) 451 if (cb->cb_clp->cl_minorversion == 0)
452 return 0; 452 return 0;
453 453
454 status = decode_cb_op_status(xdr, OP_CB_SEQUENCE, &cb->cb_seq_status); 454 status = decode_cb_op_status(xdr, OP_CB_SEQUENCE, &cb->cb_seq_status);
@@ -485,7 +485,7 @@ static void nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, struct xdr_stream *xdr,
485 const struct nfs4_delegation *dp = cb_to_delegation(cb); 485 const struct nfs4_delegation *dp = cb_to_delegation(cb);
486 struct nfs4_cb_compound_hdr hdr = { 486 struct nfs4_cb_compound_hdr hdr = {
487 .ident = cb->cb_clp->cl_cb_ident, 487 .ident = cb->cb_clp->cl_cb_ident,
488 .minorversion = cb->cb_minorversion, 488 .minorversion = cb->cb_clp->cl_minorversion,
489 }; 489 };
490 490
491 encode_cb_compound4args(xdr, &hdr); 491 encode_cb_compound4args(xdr, &hdr);
@@ -594,7 +594,7 @@ static void nfs4_xdr_enc_cb_layout(struct rpc_rqst *req,
594 container_of(cb, struct nfs4_layout_stateid, ls_recall); 594 container_of(cb, struct nfs4_layout_stateid, ls_recall);
595 struct nfs4_cb_compound_hdr hdr = { 595 struct nfs4_cb_compound_hdr hdr = {
596 .ident = 0, 596 .ident = 0,
597 .minorversion = cb->cb_minorversion, 597 .minorversion = cb->cb_clp->cl_minorversion,
598 }; 598 };
599 599
600 encode_cb_compound4args(xdr, &hdr); 600 encode_cb_compound4args(xdr, &hdr);
@@ -862,7 +862,6 @@ static void nfsd4_cb_prepare(struct rpc_task *task, void *calldata)
862 struct nfs4_client *clp = cb->cb_clp; 862 struct nfs4_client *clp = cb->cb_clp;
863 u32 minorversion = clp->cl_minorversion; 863 u32 minorversion = clp->cl_minorversion;
864 864
865 cb->cb_minorversion = minorversion;
866 /* 865 /*
867 * cb_seq_status is only set in decode_cb_sequence4res, 866 * cb_seq_status is only set in decode_cb_sequence4res,
868 * and so will remain 1 if an rpc level failure occurs. 867 * and so will remain 1 if an rpc level failure occurs.
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index b95adf9a1595..0bdc79cb359c 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -63,7 +63,6 @@ typedef struct {
63 63
64struct nfsd4_callback { 64struct nfsd4_callback {
65 struct nfs4_client *cb_clp; 65 struct nfs4_client *cb_clp;
66 u32 cb_minorversion;
67 struct rpc_message cb_msg; 66 struct rpc_message cb_msg;
68 const struct nfsd4_callback_ops *cb_ops; 67 const struct nfsd4_callback_ops *cb_ops;
69 struct work_struct cb_work; 68 struct work_struct cb_work;