Skip to content

Commit 5809ea4

Browse files
chuckleveramschuma-ntap
authored andcommitted
xprtrdma: Remove the RPCRDMA_REQ_F_PENDING flag
Commit 9590d08 ("xprtrdma: Use xprt_pin_rqst in rpcrdma_reply_handler") pins incoming RPC/RDMA replies so they can be left in the pending requests queue while they are being processed without introducing a race between ->buf_free and the transport's reply handler. Therefore RPCRDMA_REQ_F_PENDING is no longer necessary. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent 05eb06d commit 5809ea4

3 files changed

Lines changed: 1 addition & 5 deletions

File tree

‎net/sunrpc/xprtrdma/rpc_rdma.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,6 @@ void rpcrdma_reply_handler(struct rpcrdma_rep *rep)
13711371
}
13721372
req->rl_reply = rep;
13731373
rep->rr_rqst = rqst;
1374-
clear_bit(RPCRDMA_REQ_F_PENDING, &req->rl_flags);
13751374

13761375
trace_xprtrdma_reply(rqst->rq_task, rep, req, credits);
13771376
queue_work(buf->rb_completion_wq, &rep->rr_work);

‎net/sunrpc/xprtrdma/transport.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,7 @@ xprt_rdma_free(struct rpc_task *task)
618618
struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(rqst->rq_xprt);
619619
struct rpcrdma_req *req = rpcr_to_rdmar(rqst);
620620

621-
if (test_bit(RPCRDMA_REQ_F_PENDING, &req->rl_flags))
622-
rpcrdma_release_rqst(r_xprt, req);
621+
rpcrdma_release_rqst(r_xprt, req);
623622
trace_xprtrdma_op_free(task, req);
624623
}
625624

@@ -667,7 +666,6 @@ xprt_rdma_send_request(struct rpc_rqst *rqst)
667666
goto drop_connection;
668667
rqst->rq_xtime = ktime_get();
669668

670-
__set_bit(RPCRDMA_REQ_F_PENDING, &req->rl_flags);
671669
if (rpcrdma_ep_post(&r_xprt->rx_ia, &r_xprt->rx_ep, req))
672670
goto drop_connection;
673671

‎net/sunrpc/xprtrdma/xprt_rdma.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ struct rpcrdma_req {
344344

345345
/* rl_flags */
346346
enum {
347-
RPCRDMA_REQ_F_PENDING = 0,
348347
RPCRDMA_REQ_F_TX_RESOURCES,
349348
};
350349

0 commit comments

Comments
 (0)