From: Christoph Hellwig Date: Sun, 8 Jul 2012 19:58:40 +0000 (-0400) Subject: target: call transport_check_aborted_status from target_execute_cmd X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d59a02b4ebe6fe5ac42b702f1ced6368ced78d76;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index aeb2d576dc0..dd9c87f62d7 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -1864,6 +1864,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.