Skip to content

Commit 13c9ff8

Browse files
chuckleveramschuma-ntap
authored andcommitted
xprtrdma: Simplify rpcrdma_deregister_external() synopsis
Clean up: All remaining callers of rpcrdma_deregister_external() pass NULL as the last argument, so remove that argument. Signed-off-by: Chuck Lever <[email protected]> Tested-by: Steve Wise <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent cdd9ade commit 13c9ff8

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

net/sunrpc/xprtrdma/rpc_rdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target,
270270
out:
271271
for (pos = 0; nchunks--;)
272272
pos += rpcrdma_deregister_external(
273-
&req->rl_segments[pos], r_xprt, NULL);
273+
&req->rl_segments[pos], r_xprt);
274274
return 0;
275275
}
276276

net/sunrpc/xprtrdma/transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ xprt_rdma_free(void *buffer)
575575
for (i = 0; req->rl_nchunks;) {
576576
--req->rl_nchunks;
577577
i += rpcrdma_deregister_external(
578-
&req->rl_segments[i], r_xprt, NULL);
578+
&req->rl_segments[i], r_xprt);
579579
}
580580

581581
if (req->rl_iov.length == 0) { /* see allocate above */

net/sunrpc/xprtrdma/verbs.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,7 @@ rpcrdma_register_external(struct rpcrdma_mr_seg *seg,
16321632

16331633
int
16341634
rpcrdma_deregister_external(struct rpcrdma_mr_seg *seg,
1635-
struct rpcrdma_xprt *r_xprt, void *r)
1635+
struct rpcrdma_xprt *r_xprt)
16361636
{
16371637
struct rpcrdma_ia *ia = &r_xprt->rx_ia;
16381638
int nsegs = seg->mr_nsegs, rc;
@@ -1658,12 +1658,6 @@ rpcrdma_deregister_external(struct rpcrdma_mr_seg *seg,
16581658
default:
16591659
break;
16601660
}
1661-
if (r) {
1662-
struct rpcrdma_rep *rep = r;
1663-
void (*func)(struct rpcrdma_rep *) = rep->rr_func;
1664-
rep->rr_func = NULL;
1665-
func(rep); /* dereg done, callback now */
1666-
}
16671661
return nsegs;
16681662
}
16691663

net/sunrpc/xprtrdma/xprt_rdma.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ int rpcrdma_deregister_internal(struct rpcrdma_ia *,
331331
int rpcrdma_register_external(struct rpcrdma_mr_seg *,
332332
int, int, struct rpcrdma_xprt *);
333333
int rpcrdma_deregister_external(struct rpcrdma_mr_seg *,
334-
struct rpcrdma_xprt *, void *);
334+
struct rpcrdma_xprt *);
335335

336336
/*
337337
* RPC/RDMA connection management calls - xprtrdma/rpc_rdma.c

0 commit comments

Comments
 (0)