summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_transport.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-07-08 15:58:40 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-07-16 17:35:16 -0700
commitd59a02b4ebe6fe5ac42b702f1ced6368ced78d76 (patch)
tree226d6282b93e444a142c3feedc741e4d180f5ea9 /drivers/target/target_core_transport.c
parent70baf0ab3b2608727515086bee4c484a93e22880 (diff)
downloadtalos-op-linux-d59a02b4ebe6fe5ac42b702f1ced6368ced78d76.tar.gz
talos-op-linux-d59a02b4ebe6fe5ac42b702f1ced6368ced78d76.zip
target: call transport_check_aborted_status from target_execute_cmd
When we call target_execute_cmd for write commands the command has been on the state list before an abort might have come in before target_execute_cmd. Call transport_check_aborted_status to deal with this case. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r--drivers/target/target_core_transport.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index aeb2d576dc00..dd9c87f62d76 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1865,6 +1865,12 @@ void target_execute_cmd(struct se_cmd *cmd)
struct se_device *dev = cmd->se_dev;
/*
+ * If the received CDB has aleady been aborted stop processing it here.
+ */
+ if (transport_check_aborted_status(cmd, 1))
+ return;
+
+ /*
* Determine if IOCTL context caller in requesting the stopping of this
* command for LUN shutdown purposes.
*/
OpenPOWER on IntegriCloud