提交 d4e2ce09 编写于 作者: K Kinglong Mee 提交者: Trond Myklebust

NFS: Get rid of the unneeded addr stored in callback arguments

Commit c36fca52 "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: NKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 c6466193
...@@ -61,7 +61,6 @@ struct cb_compound_hdr_res { ...@@ -61,7 +61,6 @@ struct cb_compound_hdr_res {
}; };
struct cb_getattrargs { struct cb_getattrargs {
struct sockaddr *addr;
struct nfs_fh fh; struct nfs_fh fh;
uint32_t bitmap[2]; uint32_t bitmap[2];
}; };
...@@ -76,7 +75,6 @@ struct cb_getattrres { ...@@ -76,7 +75,6 @@ struct cb_getattrres {
}; };
struct cb_recallargs { struct cb_recallargs {
struct sockaddr *addr;
struct nfs_fh fh; struct nfs_fh fh;
nfs4_stateid stateid; nfs4_stateid stateid;
uint32_t truncate; uint32_t truncate;
...@@ -134,7 +132,6 @@ extern int nfs41_validate_delegation_stateid(struct nfs_delegation *delegation, ...@@ -134,7 +132,6 @@ extern int nfs41_validate_delegation_stateid(struct nfs_delegation *delegation,
#define RCA4_TYPE_MASK_ALL 0xf31f #define RCA4_TYPE_MASK_ALL 0xf31f
struct cb_recallanyargs { struct cb_recallanyargs {
struct sockaddr *craa_addr;
uint32_t craa_objs_to_keep; uint32_t craa_objs_to_keep;
uint32_t craa_type_mask; uint32_t craa_type_mask;
}; };
...@@ -144,7 +141,6 @@ extern __be32 nfs4_callback_recallany(struct cb_recallanyargs *args, ...@@ -144,7 +141,6 @@ extern __be32 nfs4_callback_recallany(struct cb_recallanyargs *args,
struct cb_process_state *cps); struct cb_process_state *cps);
struct cb_recallslotargs { struct cb_recallslotargs {
struct sockaddr *crsa_addr;
uint32_t crsa_target_highest_slotid; uint32_t crsa_target_highest_slotid;
}; };
extern __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, extern __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args,
...@@ -152,7 +148,6 @@ extern __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, ...@@ -152,7 +148,6 @@ extern __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args,
struct cb_process_state *cps); struct cb_process_state *cps);
struct cb_layoutrecallargs { struct cb_layoutrecallargs {
struct sockaddr *cbl_addr;
uint32_t cbl_recall_type; uint32_t cbl_recall_type;
uint32_t cbl_layout_type; uint32_t cbl_layout_type;
uint32_t cbl_layoutchanged; uint32_t cbl_layoutchanged;
......
...@@ -198,7 +198,6 @@ static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr ...@@ -198,7 +198,6 @@ static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr
status = decode_fh(xdr, &args->fh); status = decode_fh(xdr, &args->fh);
if (unlikely(status != 0)) if (unlikely(status != 0))
goto out; goto out;
args->addr = svc_addr(rqstp);
status = decode_bitmap(xdr, args->bitmap); status = decode_bitmap(xdr, args->bitmap);
out: out:
dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); 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,7 +209,6 @@ static __be32 decode_recall_args(struct svc_rqst *rqstp, struct xdr_stream *xdr,
__be32 *p; __be32 *p;
__be32 status; __be32 status;
args->addr = svc_addr(rqstp);
status = decode_stateid(xdr, &args->stateid); status = decode_stateid(xdr, &args->stateid);
if (unlikely(status != 0)) if (unlikely(status != 0))
goto out; goto out;
...@@ -236,7 +234,6 @@ static __be32 decode_layoutrecall_args(struct svc_rqst *rqstp, ...@@ -236,7 +234,6 @@ static __be32 decode_layoutrecall_args(struct svc_rqst *rqstp,
__be32 status = 0; __be32 status = 0;
uint32_t iomode; uint32_t iomode;
args->cbl_addr = svc_addr(rqstp);
p = read_buf(xdr, 4 * sizeof(uint32_t)); p = read_buf(xdr, 4 * sizeof(uint32_t));
if (unlikely(p == NULL)) { if (unlikely(p == NULL)) {
status = htonl(NFS4ERR_BADXDR); status = htonl(NFS4ERR_BADXDR);
...@@ -500,7 +497,6 @@ static __be32 decode_recallany_args(struct svc_rqst *rqstp, ...@@ -500,7 +497,6 @@ static __be32 decode_recallany_args(struct svc_rqst *rqstp,
uint32_t bitmap[2]; uint32_t bitmap[2];
__be32 *p, status; __be32 *p, status;
args->craa_addr = svc_addr(rqstp);
p = read_buf(xdr, 4); p = read_buf(xdr, 4);
if (unlikely(p == NULL)) if (unlikely(p == NULL))
return htonl(NFS4ERR_BADXDR); return htonl(NFS4ERR_BADXDR);
...@@ -519,7 +515,6 @@ static __be32 decode_recallslot_args(struct svc_rqst *rqstp, ...@@ -519,7 +515,6 @@ static __be32 decode_recallslot_args(struct svc_rqst *rqstp,
{ {
__be32 *p; __be32 *p;
args->crsa_addr = svc_addr(rqstp);
p = read_buf(xdr, 4); p = read_buf(xdr, 4);
if (unlikely(p == NULL)) if (unlikely(p == NULL))
return htonl(NFS4ERR_BADXDR); return htonl(NFS4ERR_BADXDR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册