mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 03:31:26 +00:00
ib_srpt: Revert most of r4282 - a channel must be added to the channel list before unlocking the spinlock such that the completion thread can safely invoke list_del()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4284 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2551,16 +2551,6 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id,
|
||||
|
||||
spin_lock_irq(&sdev->spinlock);
|
||||
|
||||
if (!sdev->enabled) {
|
||||
rej->reason = cpu_to_be32(
|
||||
SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES);
|
||||
PRINT_ERROR("rejected SRP_LOGIN_REQ because the target %s (%s)"
|
||||
" is not enabled",
|
||||
sdev->scst_tgt->tgt_name, sdev->device->name);
|
||||
spin_unlock_irq(&sdev->spinlock);
|
||||
goto reject;
|
||||
}
|
||||
|
||||
if ((req->req_flags & SRP_MTCH_ACTION) == SRP_MULTICHAN_SINGLE) {
|
||||
struct srpt_rdma_ch *ch2;
|
||||
|
||||
@@ -2591,6 +2581,16 @@ restart:
|
||||
list_add_tail(&ch->list, &sdev->rch_list);
|
||||
ch->thread = thread;
|
||||
|
||||
if (!sdev->enabled) {
|
||||
rej->reason = cpu_to_be32(
|
||||
SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES);
|
||||
PRINT_ERROR("rejected SRP_LOGIN_REQ because the target %s (%s)"
|
||||
" is not enabled",
|
||||
sdev->scst_tgt->tgt_name, sdev->device->name);
|
||||
spin_unlock_irq(&sdev->spinlock);
|
||||
goto reject;
|
||||
}
|
||||
|
||||
spin_unlock_irq(&sdev->spinlock);
|
||||
|
||||
ret = srpt_ch_qp_rtr(ch, ch->qp);
|
||||
|
||||
Reference in New Issue
Block a user