diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-10-11 02:02:48 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-10-23 23:19:49 -0400 |
commit | b0e062aec578c756d1aea4b5809294488366a6e8 (patch) | |
tree | be27087f96cade8c65c4ccb6c5ab53a5c28729d5 /drivers/target/target_core_tmr.c | |
parent | d050ffb922c782f092234611b9019e95024481ab (diff) |
target: Prevent TRANSPORT_FREE_CMD_INTR processing in core_tmr_drain_cmd_list
This patch contains a bugfix for TMR LUN_RESET related to TRANSPORT_FREE_CMD_INTR
operation, where core_tmr_drain_cmd_list() will now skip processing for this
case to prevent an ABORT_TASK status from being returned for descriptors that
are already queued up to be released by processing thread context.
Cc: Roland Dreier <roland@purestorage.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger <nab@risingtidesystems.com>
Diffstat (limited to 'drivers/target/target_core_tmr.c')
-rw-r--r-- | drivers/target/target_core_tmr.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index ed0b1ff99110..d04cc1016ebf 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c | |||
@@ -339,6 +339,16 @@ static void core_tmr_drain_cmd_list( | |||
339 | */ | 339 | */ |
340 | if (prout_cmd == cmd) | 340 | if (prout_cmd == cmd) |
341 | continue; | 341 | continue; |
342 | /* | ||
343 | * Skip direct processing of TRANSPORT_FREE_CMD_INTR for | ||
344 | * HW target mode fabrics. | ||
345 | */ | ||
346 | spin_lock(&cmd->t_state_lock); | ||
347 | if (cmd->t_state == TRANSPORT_FREE_CMD_INTR) { | ||
348 | spin_unlock(&cmd->t_state_lock); | ||
349 | continue; | ||
350 | } | ||
351 | spin_unlock(&cmd->t_state_lock); | ||
342 | 352 | ||
343 | atomic_set(&cmd->t_transport_queue_active, 0); | 353 | atomic_set(&cmd->t_transport_queue_active, 0); |
344 | atomic_dec(&qobj->queue_cnt); | 354 | atomic_dec(&qobj->queue_cnt); |