Commit b0e062ae authored by Nicholas Bellinger's avatar Nicholas Bellinger

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: default avatarNicholas Bellinger <nab@risingtidesystems.com>
parent d050ffb9
...@@ -339,6 +339,16 @@ static void core_tmr_drain_cmd_list( ...@@ -339,6 +339,16 @@ static void core_tmr_drain_cmd_list(
*/ */
if (prout_cmd == cmd) if (prout_cmd == cmd)
continue; continue;
/*
* Skip direct processing of TRANSPORT_FREE_CMD_INTR for
* HW target mode fabrics.
*/
spin_lock(&cmd->t_state_lock);
if (cmd->t_state == TRANSPORT_FREE_CMD_INTR) {
spin_unlock(&cmd->t_state_lock);
continue;
}
spin_unlock(&cmd->t_state_lock);
atomic_set(&cmd->t_transport_queue_active, 0); atomic_set(&cmd->t_transport_queue_active, 0);
atomic_dec(&qobj->queue_cnt); atomic_dec(&qobj->queue_cnt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment