diff options
-rw-r--r-- | drivers/scsi/libiscsi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 963002598995..a223413e1564 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -552,8 +552,10 @@ static int iscsi_data_xmit(struct iscsi_conn *conn) | |||
552 | if (unlikely(__kfifo_len(conn->immqueue))) { | 552 | if (unlikely(__kfifo_len(conn->immqueue))) { |
553 | while (__kfifo_get(conn->immqueue, (void*)&conn->mtask, | 553 | while (__kfifo_get(conn->immqueue, (void*)&conn->mtask, |
554 | sizeof(void*))) { | 554 | sizeof(void*))) { |
555 | spin_lock_bh(&conn->session->lock); | ||
555 | list_add_tail(&conn->mtask->running, | 556 | list_add_tail(&conn->mtask->running, |
556 | &conn->mgmt_run_list); | 557 | &conn->mgmt_run_list); |
558 | spin_unlock_bh(&conn->session->lock); | ||
557 | if (tt->xmit_mgmt_task(conn, conn->mtask)) | 559 | if (tt->xmit_mgmt_task(conn, conn->mtask)) |
558 | goto again; | 560 | goto again; |
559 | } | 561 | } |
@@ -568,8 +570,10 @@ static int iscsi_data_xmit(struct iscsi_conn *conn) | |||
568 | * iscsi tcp may readd the task to the xmitqueue to send | 570 | * iscsi tcp may readd the task to the xmitqueue to send |
569 | * write data | 571 | * write data |
570 | */ | 572 | */ |
573 | spin_lock_bh(&conn->session->lock); | ||
571 | if (list_empty(&conn->ctask->running)) | 574 | if (list_empty(&conn->ctask->running)) |
572 | list_add_tail(&conn->ctask->running, &conn->run_list); | 575 | list_add_tail(&conn->ctask->running, &conn->run_list); |
576 | spin_unlock_bh(&conn->session->lock); | ||
573 | if (tt->xmit_cmd_task(conn, conn->ctask)) | 577 | if (tt->xmit_cmd_task(conn, conn->ctask)) |
574 | goto again; | 578 | goto again; |
575 | } | 579 | } |
@@ -580,8 +584,10 @@ static int iscsi_data_xmit(struct iscsi_conn *conn) | |||
580 | if (unlikely(__kfifo_len(conn->mgmtqueue))) { | 584 | if (unlikely(__kfifo_len(conn->mgmtqueue))) { |
581 | while (__kfifo_get(conn->mgmtqueue, (void*)&conn->mtask, | 585 | while (__kfifo_get(conn->mgmtqueue, (void*)&conn->mtask, |
582 | sizeof(void*))) { | 586 | sizeof(void*))) { |
587 | spin_lock_bh(&conn->session->lock); | ||
583 | list_add_tail(&conn->mtask->running, | 588 | list_add_tail(&conn->mtask->running, |
584 | &conn->mgmt_run_list); | 589 | &conn->mgmt_run_list); |
590 | spin_unlock_bh(&conn->session->lock); | ||
585 | if (tt->xmit_mgmt_task(conn, conn->mtask)) | 591 | if (tt->xmit_mgmt_task(conn, conn->mtask)) |
586 | goto again; | 592 | goto again; |
587 | } | 593 | } |