summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-06-22 14:52:50 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2018-07-02 16:44:30 -0400
commit3eeff1984051e45448765e49b712c6bfee1de378 (patch)
tree348731c4981168b8314853d8be09c1c22a6f8d0d /drivers/target
parent36d4cb460bcbe2a1323732a6e4bb9dd783284368 (diff)
downloadlinux-3eeff1984051e45448765e49b712c6bfee1de378.tar.gz
linux-3eeff1984051e45448765e49b712c6bfee1de378.tar.bz2
linux-3eeff1984051e45448765e49b712c6bfee1de378.zip
scsi: target: Move a list_del_init() statement
This patch does not change any functionality but makes the next patch easier to read. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Mike Christie <mchristi@redhat.com> Cc: Mike Christie <mchristi@redhat.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_transport.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 89dd475d0a8f..5e8329c5ddd0 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2697,6 +2697,7 @@ static void target_release_cmd_kref(struct kref *kref)
if (se_sess) {
spin_lock_irqsave(&se_sess->sess_cmd_lock, flags);
+ list_del_init(&se_cmd->se_cmd_list);
spin_lock(&se_cmd->t_state_lock);
fabric_stop = (se_cmd->transport_state & CMD_T_FABRIC_STOP) &&
@@ -2704,13 +2705,11 @@ static void target_release_cmd_kref(struct kref *kref)
spin_unlock(&se_cmd->t_state_lock);
if (se_cmd->cmd_wait_set || fabric_stop) {
- list_del_init(&se_cmd->se_cmd_list);
spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
target_free_cmd_mem(se_cmd);
complete(&se_cmd->cmd_wait_comp);
return;
}
- list_del_init(&se_cmd->se_cmd_list);
spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
}