diff mbox

[v5,15/20] net/rds: Remove two WARN_ON() statements

Message ID 20180718162532.14633-16-bart.vanassche@wdc.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show

Commit Message

Bart Van Assche July 18, 2018, 4:25 p.m. UTC
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 <bart.vanassche@wdc.com>
Cc: Santosh Shilimkar <santosh.shilimkar@oracle.com>
---
 net/rds/ib_frmr.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Santosh Shilimkar July 18, 2018, 4:48 p.m. UTC | #1
On 7/18/2018 9:25 AM, Bart Van Assche wrote:
> 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 <bart.vanassche@wdc.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@oracle.com>
> ---
Looks good. Thanks !!

Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/rds/ib_frmr.c b/net/rds/ib_frmr.c
index 48332a6ed738..0209cd81546c 100644
--- a/net/rds/ib_frmr.c
+++ b/net/rds/ib_frmr.c
@@ -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;
@@ -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;