diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2015-09-24 08:55:21 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-10-21 16:49:22 -0400 |
commit | d4e2ce096101bad9ca5bad3c27488905f91e30cb (patch) | |
tree | a1e5345da1b298b7357aa3afcd5701745dd838da | |
parent | c646619355d196293daffdbb4fd877c8f5048e49 (diff) |
NFS: Get rid of the unneeded addr stored in callback arguments
Commit c36fca52f5 "NFS refactor nfs_find_client and reference client
across callback processing" has store clp in cb_process_state
which is set in cb_sequence.
So that, it's unneeded to store address pointer in any callback arguments.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
-rw-r--r-- | fs/nfs/callback.h | 5 | ||||
-rw-r--r-- | fs/nfs/callback_xdr.c | 5 |
2 files changed, 0 insertions, 10 deletions
diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h index 84326e9fb47a..0a590f05c7cd 100644 --- a/fs/nfs/callback.h +++ b/fs/nfs/callback.h | |||
@@ -61,7 +61,6 @@ struct cb_compound_hdr_res { | |||
61 | }; | 61 | }; |
62 | 62 | ||
63 | struct cb_getattrargs { | 63 | struct cb_getattrargs { |
64 | struct sockaddr *addr; | ||
65 | struct nfs_fh fh; | 64 | struct nfs_fh fh; |
66 | uint32_t bitmap[2]; | 65 | uint32_t bitmap[2]; |
67 | }; | 66 | }; |
@@ -76,7 +75,6 @@ struct cb_getattrres { | |||
76 | }; | 75 | }; |
77 | 76 | ||
78 | struct cb_recallargs { | 77 | struct cb_recallargs { |
79 | struct sockaddr *addr; | ||
80 | struct nfs_fh fh; | 78 | struct nfs_fh fh; |
81 | nfs4_stateid stateid; | 79 | nfs4_stateid stateid; |
82 | uint32_t truncate; | 80 | uint32_t truncate; |
@@ -134,7 +132,6 @@ extern int nfs41_validate_delegation_stateid(struct nfs_delegation *delegation, | |||
134 | #define RCA4_TYPE_MASK_ALL 0xf31f | 132 | #define RCA4_TYPE_MASK_ALL 0xf31f |
135 | 133 | ||
136 | struct cb_recallanyargs { | 134 | struct cb_recallanyargs { |
137 | struct sockaddr *craa_addr; | ||
138 | uint32_t craa_objs_to_keep; | 135 | uint32_t craa_objs_to_keep; |
139 | uint32_t craa_type_mask; | 136 | uint32_t craa_type_mask; |
140 | }; | 137 | }; |
@@ -144,7 +141,6 @@ extern __be32 nfs4_callback_recallany(struct cb_recallanyargs *args, | |||
144 | struct cb_process_state *cps); | 141 | struct cb_process_state *cps); |
145 | 142 | ||
146 | struct cb_recallslotargs { | 143 | struct cb_recallslotargs { |
147 | struct sockaddr *crsa_addr; | ||
148 | uint32_t crsa_target_highest_slotid; | 144 | uint32_t crsa_target_highest_slotid; |
149 | }; | 145 | }; |
150 | extern __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, | 146 | extern __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, |
@@ -152,7 +148,6 @@ extern __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, | |||
152 | struct cb_process_state *cps); | 148 | struct cb_process_state *cps); |
153 | 149 | ||
154 | struct cb_layoutrecallargs { | 150 | struct cb_layoutrecallargs { |
155 | struct sockaddr *cbl_addr; | ||
156 | uint32_t cbl_recall_type; | 151 | uint32_t cbl_recall_type; |
157 | uint32_t cbl_layout_type; | 152 | uint32_t cbl_layout_type; |
158 | uint32_t cbl_layoutchanged; | 153 | uint32_t cbl_layoutchanged; |
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index 6b1697a01dde..e87d7f0f4e23 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c | |||
@@ -198,7 +198,6 @@ static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr | |||
198 | status = decode_fh(xdr, &args->fh); | 198 | status = decode_fh(xdr, &args->fh); |
199 | if (unlikely(status != 0)) | 199 | if (unlikely(status != 0)) |
200 | goto out; | 200 | goto out; |
201 | args->addr = svc_addr(rqstp); | ||
202 | status = decode_bitmap(xdr, args->bitmap); | 201 | status = decode_bitmap(xdr, args->bitmap); |
203 | out: | 202 | out: |
204 | dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); | 203 | dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); |
@@ -210,7 +209,6 @@ static __be32 decode_recall_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, | |||
210 | __be32 *p; | 209 | __be32 *p; |
211 | __be32 status; | 210 | __be32 status; |
212 | 211 | ||
213 | args->addr = svc_addr(rqstp); | ||
214 | status = decode_stateid(xdr, &args->stateid); | 212 | status = decode_stateid(xdr, &args->stateid); |
215 | if (unlikely(status != 0)) | 213 | if (unlikely(status != 0)) |
216 | goto out; | 214 | goto out; |
@@ -236,7 +234,6 @@ static __be32 decode_layoutrecall_args(struct svc_rqst *rqstp, | |||
236 | __be32 status = 0; | 234 | __be32 status = 0; |
237 | uint32_t iomode; | 235 | uint32_t iomode; |
238 | 236 | ||
239 | args->cbl_addr = svc_addr(rqstp); | ||
240 | p = read_buf(xdr, 4 * sizeof(uint32_t)); | 237 | p = read_buf(xdr, 4 * sizeof(uint32_t)); |
241 | if (unlikely(p == NULL)) { | 238 | if (unlikely(p == NULL)) { |
242 | status = htonl(NFS4ERR_BADXDR); | 239 | status = htonl(NFS4ERR_BADXDR); |
@@ -500,7 +497,6 @@ static __be32 decode_recallany_args(struct svc_rqst *rqstp, | |||
500 | uint32_t bitmap[2]; | 497 | uint32_t bitmap[2]; |
501 | __be32 *p, status; | 498 | __be32 *p, status; |
502 | 499 | ||
503 | args->craa_addr = svc_addr(rqstp); | ||
504 | p = read_buf(xdr, 4); | 500 | p = read_buf(xdr, 4); |
505 | if (unlikely(p == NULL)) | 501 | if (unlikely(p == NULL)) |
506 | return htonl(NFS4ERR_BADXDR); | 502 | return htonl(NFS4ERR_BADXDR); |
@@ -519,7 +515,6 @@ static __be32 decode_recallslot_args(struct svc_rqst *rqstp, | |||
519 | { | 515 | { |
520 | __be32 *p; | 516 | __be32 *p; |
521 | 517 | ||
522 | args->crsa_addr = svc_addr(rqstp); | ||
523 | p = read_buf(xdr, 4); | 518 | p = read_buf(xdr, 4); |
524 | if (unlikely(p == NULL)) | 519 | if (unlikely(p == NULL)) |
525 | return htonl(NFS4ERR_BADXDR); | 520 | return htonl(NFS4ERR_BADXDR); |