Commit e6581056 authored by Roland Dreier's avatar Roland Dreier

IB/srp: Don't wait for disconnection if sending DREQ fails

Sending a DREQ may fail, for example because the remote target has
already broken the connection.  If so, then SRP should not wait for
the disconnection to complete, because it never will.
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 1db76c14
...@@ -340,7 +340,10 @@ static void srp_disconnect_target(struct srp_target_port *target) ...@@ -340,7 +340,10 @@ static void srp_disconnect_target(struct srp_target_port *target)
/* XXX should send SRP_I_LOGOUT request */ /* XXX should send SRP_I_LOGOUT request */
init_completion(&target->done); init_completion(&target->done);
ib_send_cm_dreq(target->cm_id, NULL, 0); if (ib_send_cm_dreq(target->cm_id, NULL, 0)) {
printk(KERN_DEBUG PFX "Sending CM DREQ failed\n");
return;
}
wait_for_completion(&target->done); wait_for_completion(&target->done);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment