* [PATCH] tcm_loop: Drop legacy host_lock usage in SHT->queuecommand() caller
@ 2010-11-11 10:25 Nicholas A. Bellinger
0 siblings, 0 replies; only message in thread
From: Nicholas A. Bellinger @ 2010-11-11 10:25 UTC (permalink / raw)
To: linux-scsi, linux-kernel, Jeff Garzik, James Bottomley
Cc: Christoph Hellwig, Nicholas Bellinger
From: Nicholas Bellinger <nab@linux-iscsi.org>
Following the the great host lock push-down in 3039f3ffcc5, this patch drops
the historical optimization (and most certain deadlock) of:
spin_unlock_irq(host_lock); do_some_lld_work(); spin_lock_irq(host_lock)
from within tcm_loop_queuecommand()
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
---
drivers/target/tcm_loop/tcm_loop_fabric_scsi.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/drivers/target/tcm_loop/tcm_loop_fabric_scsi.c b/drivers/target/tcm_loop/tcm_loop_fabric_scsi.c
index 80f2940..8175681 100644
--- a/drivers/target/tcm_loop/tcm_loop_fabric_scsi.c
+++ b/drivers/target/tcm_loop/tcm_loop_fabric_scsi.c
@@ -311,7 +311,6 @@ static int tcm_loop_queuecommand(
{
struct se_cmd *se_cmd;
struct se_portal_group *se_tpg;
- struct Scsi_Host *host = sc->device->host;
struct tcm_loop_hba *tl_hba;
struct tcm_loop_tpg *tl_tpg;
@@ -321,8 +320,6 @@ static int tcm_loop_queuecommand(
" scsi_buf_len: %u\n", sc->device->host->host_no,
sc->device->id, sc->device->channel, sc->device->lun,
sc->cmnd[0], scsi_bufflen(sc));
-
- spin_unlock_irq(host->host_lock);
/*
* Locate the tcm_loop_hba_t pointer
*/
@@ -342,7 +339,6 @@ static int tcm_loop_queuecommand(
*/
se_cmd = tcm_loop_allocate_core_cmd(tl_hba, se_tpg, sc);
if (!(se_cmd)) {
- spin_lock_irq(host->host_lock);
sc->result = host_byte(DID_ERROR);
(*done)(sc);
return 0;
@@ -351,10 +347,6 @@ static int tcm_loop_queuecommand(
* Queue up the newly allocated to be processed in TCM thread context.
*/
transport_generic_handle_cdb_map(se_cmd);
- /*
- * Reaquire the the struct scsi_host->host_lock before returning
- */
- spin_lock_irq(host->host_lock);
return 0;
}
--
1.5.6.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-11 10:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-11 10:25 [PATCH] tcm_loop: Drop legacy host_lock usage in SHT->queuecommand() caller Nicholas A. Bellinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®