Skip to content

Commit

Permalink
net/rds: Remove two WARN_ON() statements
Browse files Browse the repository at this point in the history
Remove two WARN_ON() statements that verify something that is guaranteed
by the RDMA API, namely that the failed_wr pointer is not touched if an
ib_post_send() call succeeds and that it points at the failed wr if an
ib_post_send() call fails.

Signed-off-by: Bart Van Assche <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
  • Loading branch information
KAGA-KOKO authored and jgunthorpe committed Jul 24, 2018
1 parent 72bc4d3 commit 197c782
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/rds/ib_frmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr)

failed_wr = &reg_wr.wr;
ret = ib_post_send(ibmr->ic->i_cm_id->qp, &reg_wr.wr, &failed_wr);
WARN_ON(failed_wr != &reg_wr.wr);
if (unlikely(ret)) {
/* Failure here can be because of -ENOMEM as well */
frmr->fr_state = FRMR_IS_STALE;
Expand Down Expand Up @@ -257,7 +256,6 @@ static int rds_ib_post_inv(struct rds_ib_mr *ibmr)

failed_wr = s_wr;
ret = ib_post_send(i_cm_id->qp, s_wr, &failed_wr);
WARN_ON(failed_wr != s_wr);
if (unlikely(ret)) {
frmr->fr_state = FRMR_IS_STALE;
frmr->fr_inv = false;
Expand Down

0 comments on commit 197c782

Please sign in to comment.