aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libiscsi.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 5aa0db150436..801c7cf54d2e 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -404,11 +404,6 @@ static void fail_command(struct iscsi_conn *conn, struct iscsi_task *task,
404 conn->session->queued_cmdsn--; 404 conn->session->queued_cmdsn--;
405 else 405 else
406 conn->session->tt->cleanup_task(conn, task); 406 conn->session->tt->cleanup_task(conn, task);
407 /*
408 * Check if cleanup_task dropped the lock and the command completed,
409 */
410 if (!task->sc)
411 return;
412 407
413 sc->result = err; 408 sc->result = err;
414 if (!scsi_bidi_cmnd(sc)) 409 if (!scsi_bidi_cmnd(sc))
@@ -1829,10 +1824,10 @@ int iscsi_eh_device_reset(struct scsi_cmnd *sc)
1829 1824
1830 iscsi_suspend_tx(conn); 1825 iscsi_suspend_tx(conn);
1831 1826
1832 spin_lock(&session->lock); 1827 spin_lock_bh(&session->lock);
1833 fail_all_commands(conn, sc->device->lun, DID_ERROR); 1828 fail_all_commands(conn, sc->device->lun, DID_ERROR);
1834 conn->tmf_state = TMF_INITIAL; 1829 conn->tmf_state = TMF_INITIAL;
1835 spin_unlock(&session->lock); 1830 spin_unlock_bh(&session->lock);
1836 1831
1837 iscsi_start_tx(conn); 1832 iscsi_start_tx(conn);
1838 goto done; 1833 goto done;