Skip to contentSkip to conversation

tcm_loop: Remove host_lock unlock() + lock() from tcm_loop_queuecommand()

PATCH In review Nicholas A. Bellinger 1 participant 1 message Sep 16, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 7/8 tcm_loop: Remove host_lock unlock() + lock() from tcm_loop_queuecommand()

From: Nicholas Bellinger <[email protected]>

This patch removes the now legacy host_lock unlock() + lock() optimization from tcm_loop_fabric_scsi.c:tcm_loop_queuecommand()

---
 drivers/target/tcm_loop/tcm_loop_fabric_scsi.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
drivers/target/tcm_loop/tcm_loop_fabric_scsi.c +0 -7
index b95ed03..a0a1a55 100644
@@ -324,8 +324,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 
 	 */
@@ -345,7 +343,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;
@@ -354,10 +351,6 @@ static int tcm_loop_queuecommand(
 	 * Queue up the newly allocated to be processed in TCM thread context.
 	*/
 	se_cmd->transport_add_cmd_to_queue(se_cmd, TRANSPORT_NEW_CMD_MAP);
-	/*
-	 * Reaquire the the struct scsi_host->host_lock before returning
-	 */
-	spin_lock_irq(host->host_lock);
 	return 0;
 }
 
Signature · 1 line
1.7.2.3