summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2016-09-15 10:57:57 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-09-19 13:08:38 -0400
commit496b77a5c5ce8cd36b5fb78b8811f015643a6541 (patch)
tree76953b4d715bbb4d63e9ae8065f6d48e92d4de78 /net/sunrpc
parent1519e9697d684b706a447c9d4b6c74ba5135d2e4 (diff)
xprtrdma: Eliminate rpcrdma_receive_worker()
Clean up: the extra layer of indirection doesn't add value. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprtrdma/rpc_rdma.c4
-rw-r--r--net/sunrpc/xprtrdma/verbs.c11
-rw-r--r--net/sunrpc/xprtrdma/xprt_rdma.h2
3 files changed, 5 insertions, 12 deletions
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index 63bf0119f949..d987c2d3dd6e 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -977,8 +977,10 @@ rpcrdma_conn_func(struct rpcrdma_ep *ep)
977 * allowed to timeout, to discover the errors at that time. 977 * allowed to timeout, to discover the errors at that time.
978 */ 978 */
979void 979void
980rpcrdma_reply_handler(struct rpcrdma_rep *rep) 980rpcrdma_reply_handler(struct work_struct *work)
981{ 981{
982 struct rpcrdma_rep *rep =
983 container_of(work, struct rpcrdma_rep, rr_work);
982 struct rpcrdma_msg *headerp; 984 struct rpcrdma_msg *headerp;
983 struct rpcrdma_req *req; 985 struct rpcrdma_req *req;
984 struct rpc_rqst *rqst; 986 struct rpc_rqst *rqst;
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 48a2b67c3ea1..cbab98bfcdd8 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -129,15 +129,6 @@ rpcrdma_wc_send(struct ib_cq *cq, struct ib_wc *wc)
129 wc->status, wc->vendor_err); 129 wc->status, wc->vendor_err);
130} 130}
131 131
132static void
133rpcrdma_receive_worker(struct work_struct *work)
134{
135 struct rpcrdma_rep *rep =
136 container_of(work, struct rpcrdma_rep, rr_work);
137
138 rpcrdma_reply_handler(rep);
139}
140
141/* Perform basic sanity checking to avoid using garbage 132/* Perform basic sanity checking to avoid using garbage
142 * to update the credit grant value. 133 * to update the credit grant value.
143 */ 134 */
@@ -919,7 +910,7 @@ rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt)
919 rep->rr_device = ia->ri_device; 910 rep->rr_device = ia->ri_device;
920 rep->rr_cqe.done = rpcrdma_wc_receive; 911 rep->rr_cqe.done = rpcrdma_wc_receive;
921 rep->rr_rxprt = r_xprt; 912 rep->rr_rxprt = r_xprt;
922 INIT_WORK(&rep->rr_work, rpcrdma_receive_worker); 913 INIT_WORK(&rep->rr_work, rpcrdma_reply_handler);
923 rep->rr_recv_wr.next = NULL; 914 rep->rr_recv_wr.next = NULL;
924 rep->rr_recv_wr.wr_cqe = &rep->rr_cqe; 915 rep->rr_recv_wr.wr_cqe = &rep->rr_cqe;
925 rep->rr_recv_wr.sg_list = &rep->rr_rdmabuf->rg_iov; 916 rep->rr_recv_wr.sg_list = &rep->rr_rdmabuf->rg_iov;
diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
index b2823d9b79ae..0d35b761c883 100644
--- a/net/sunrpc/xprtrdma/xprt_rdma.h
+++ b/net/sunrpc/xprtrdma/xprt_rdma.h
@@ -535,7 +535,7 @@ rpcrdma_data_dir(bool writing)
535 */ 535 */
536void rpcrdma_connect_worker(struct work_struct *); 536void rpcrdma_connect_worker(struct work_struct *);
537void rpcrdma_conn_func(struct rpcrdma_ep *); 537void rpcrdma_conn_func(struct rpcrdma_ep *);
538void rpcrdma_reply_handler(struct rpcrdma_rep *); 538void rpcrdma_reply_handler(struct work_struct *);
539 539
540/* 540/*
541 * RPC/RDMA protocol calls - xprtrdma/rpc_rdma.c 541 * RPC/RDMA protocol calls - xprtrdma/rpc_rdma.c