net/smc: avoid a delay by waiting for nothing
authorKarsten Graul <kgraul@linux.ibm.com>
Thu, 22 Nov 2018 09:26:41 +0000 (10:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 24 Nov 2018 01:20:32 +0000 (17:20 -0800)
When a send failed then don't start to wait for a response in
smc_llc_do_confirm_rkey.

Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_llc.c

index 9c916c709ca71129d52d3e2d695e5a8076244458..132c6a8e49f83e36901e2495d56fe6795b0d4236 100644 (file)
@@ -651,7 +651,9 @@ int smc_llc_do_confirm_rkey(struct smc_link *link,
        int rc;
 
        reinit_completion(&link->llc_confirm_rkey);
-       smc_llc_send_confirm_rkey(link, rmb_desc);
+       rc = smc_llc_send_confirm_rkey(link, rmb_desc);
+       if (rc)
+               return rc;
        /* receive CONFIRM RKEY response from server over RoCE fabric */
        rc = wait_for_completion_interruptible_timeout(&link->llc_confirm_rkey,
                                                       SMC_LLC_WAIT_TIME);