aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tmr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/target_core_tmr.c')
-rw-r--r--drivers/target/target_core_tmr.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c
index 1c59a3c23b2c..c6e0293ffdb0 100644
--- a/drivers/target/target_core_tmr.c
+++ b/drivers/target/target_core_tmr.c
@@ -3,8 +3,7 @@
3 * 3 *
4 * This file contains SPC-3 task management infrastructure 4 * This file contains SPC-3 task management infrastructure
5 * 5 *
6 * Copyright (c) 2009,2010 Rising Tide Systems 6 * (c) Copyright 2009-2012 RisingTide Systems LLC.
7 * Copyright (c) 2009,2010 Linux-iSCSI.org
8 * 7 *
9 * Nicholas A. Bellinger <nab@kernel.org> 8 * Nicholas A. Bellinger <nab@kernel.org>
10 * 9 *
@@ -140,15 +139,15 @@ void core_tmr_abort_task(
140 printk("ABORT_TASK: Found referenced %s task_tag: %u\n", 139 printk("ABORT_TASK: Found referenced %s task_tag: %u\n",
141 se_cmd->se_tfo->get_fabric_name(), ref_tag); 140 se_cmd->se_tfo->get_fabric_name(), ref_tag);
142 141
143 spin_lock_irq(&se_cmd->t_state_lock); 142 spin_lock(&se_cmd->t_state_lock);
144 if (se_cmd->transport_state & CMD_T_COMPLETE) { 143 if (se_cmd->transport_state & CMD_T_COMPLETE) {
145 printk("ABORT_TASK: ref_tag: %u already complete, skipping\n", ref_tag); 144 printk("ABORT_TASK: ref_tag: %u already complete, skipping\n", ref_tag);
146 spin_unlock_irq(&se_cmd->t_state_lock); 145 spin_unlock(&se_cmd->t_state_lock);
147 spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags); 146 spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
148 goto out; 147 goto out;
149 } 148 }
150 se_cmd->transport_state |= CMD_T_ABORTED; 149 se_cmd->transport_state |= CMD_T_ABORTED;
151 spin_unlock_irq(&se_cmd->t_state_lock); 150 spin_unlock(&se_cmd->t_state_lock);
152 151
153 list_del_init(&se_cmd->se_cmd_list); 152 list_del_init(&se_cmd->se_cmd_list);
154 kref_get(&se_cmd->cmd_kref); 153 kref_get(&se_cmd->cmd_kref);
@@ -371,7 +370,7 @@ int core_tmr_lun_reset(
371 * which the command was received shall be completed with TASK ABORTED 370 * which the command was received shall be completed with TASK ABORTED
372 * status (see SAM-4). 371 * status (see SAM-4).
373 */ 372 */
374 tas = dev->se_sub_dev->se_dev_attrib.emulate_tas; 373 tas = dev->dev_attrib.emulate_tas;
375 /* 374 /*
376 * Determine if this se_tmr is coming from a $FABRIC_MOD 375 * Determine if this se_tmr is coming from a $FABRIC_MOD
377 * or struct se_device passthrough.. 376 * or struct se_device passthrough..
@@ -399,10 +398,10 @@ int core_tmr_lun_reset(
399 * LOGICAL UNIT RESET 398 * LOGICAL UNIT RESET
400 */ 399 */
401 if (!preempt_and_abort_list && 400 if (!preempt_and_abort_list &&
402 (dev->dev_flags & DF_SPC2_RESERVATIONS)) { 401 (dev->dev_reservation_flags & DRF_SPC2_RESERVATIONS)) {
403 spin_lock(&dev->dev_reservation_lock); 402 spin_lock(&dev->dev_reservation_lock);
404 dev->dev_reserved_node_acl = NULL; 403 dev->dev_reserved_node_acl = NULL;
405 dev->dev_flags &= ~DF_SPC2_RESERVATIONS; 404 dev->dev_reservation_flags &= ~DRF_SPC2_RESERVATIONS;
406 spin_unlock(&dev->dev_reservation_lock); 405 spin_unlock(&dev->dev_reservation_lock);
407 pr_debug("LUN_RESET: SCSI-2 Released reservation\n"); 406 pr_debug("LUN_RESET: SCSI-2 Released reservation\n");
408 } 407 }