mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-28 17:30:18 +00:00
ib_srpt: Remove a superfluous check from the REQ handler
ib_send_cm_rep() checks the connection state before sending a response. Hence checking ch->state before calling ib_send_cm_rep() is superfluous, so remove that check and also the locking that is no longer needed. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5441 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2654,17 +2654,12 @@ restart:
|
||||
rep_param->responder_resources = 4;
|
||||
rep_param->initiator_depth = 4;
|
||||
|
||||
spin_lock_irq(&srpt_tgt->spinlock);
|
||||
if (ch->state == CH_CONNECTING)
|
||||
ret = ib_send_cm_rep(cm_id, rep_param);
|
||||
else
|
||||
ret = -ECONNABORTED;
|
||||
spin_unlock_irq(&srpt_tgt->spinlock);
|
||||
ret = ib_send_cm_rep(cm_id, rep_param);
|
||||
|
||||
switch (ret) {
|
||||
case 0:
|
||||
break;
|
||||
case -ECONNABORTED:
|
||||
case -EINVAL:
|
||||
goto reject;
|
||||
default:
|
||||
rej->reason = cpu_to_be32(SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES);
|
||||
|
||||
Reference in New Issue
Block a user