diff mbox

[v5,17/20] net/smc: Remove a WARN_ON() statement

Message ID 20180718162532.14633-18-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 a WARN_ON() statement that verifies 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: Ursula Braun <ubraun@linux.ibm.com>
---
 net/smc/smc_wr.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Ursula Braun July 19, 2018, 4:23 p.m. UTC | #1
On 07/18/2018 06:25 PM, Bart Van Assche wrote:
> Remove a WARN_ON() statement that verifies 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: Ursula Braun <ubraun@linux.ibm.com>
> ---

Acked-by: Ursula Braun <ubraun@linux.ibm.com>

>  net/smc/smc_wr.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c
> index dbd2605d1962..8b9bdd9bc615 100644
> --- a/net/smc/smc_wr.c
> +++ b/net/smc/smc_wr.c
> @@ -274,7 +274,6 @@ int smc_wr_reg_send(struct smc_link *link, struct ib_mr *mr)
>  	link->wr_reg.key = mr->rkey;
>  	failed_wr = &link->wr_reg.wr;
>  	rc = ib_post_send(link->roce_qp, &link->wr_reg.wr, &failed_wr);
> -	WARN_ON(failed_wr != &link->wr_reg.wr);
>  	if (rc)
>  		return rc;
>  
> 

--
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/smc/smc_wr.c b/net/smc/smc_wr.c
index dbd2605d1962..8b9bdd9bc615 100644
--- a/net/smc/smc_wr.c
+++ b/net/smc/smc_wr.c
@@ -274,7 +274,6 @@  int smc_wr_reg_send(struct smc_link *link, struct ib_mr *mr)
 	link->wr_reg.key = mr->rkey;
 	failed_wr = &link->wr_reg.wr;
 	rc = ib_post_send(link->roce_qp, &link->wr_reg.wr, &failed_wr);
-	WARN_ON(failed_wr != &link->wr_reg.wr);
 	if (rc)
 		return rc;