diff options
author | Amit Pundir <amit.pundir@linaro.org> | 2017-08-01 10:52:52 +0530 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2017-08-01 11:26:49 +0530 |
commit | b43282fc74615c71e3a58fa92a4fe62f5374acd6 (patch) | |
tree | 54c3e0f148beedd088ddb8e40268cf1c07b3bc08 /drivers/target/target_core_transport.c | |
parent | f83fb557207250de93aa8882df19acfc7fe7ace7 (diff) | |
parent | 37f3f1536a86154b0c1cc2586fa6c513e79a440e (diff) |
Merge branch 'linux-linaro-lsk-v3.18' into linux-linaro-lsk-v3.18-androidlsk-v3.18-17.08-android
Conflicts:
arch/arm64/kernel/setup.c
AOSP Change-Id: I98624593273ae4c90ae299f063d26f35a39a0a31
(upstream commit 12d11817eaaf "arm64: Move /proc/cpuinfo handling code")
moved /proc/cpuinfo handling code from
arch/arm64/kernel/{setup.c to cpuinfo.c}.
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r-- | drivers/target/target_core_transport.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index d206274e6676..e59c8b3fd4f1 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -693,6 +693,15 @@ void target_complete_cmd(struct se_cmd *cmd, u8 scsi_status) if (cmd->transport_state & CMD_T_ABORTED || cmd->transport_state & CMD_T_STOP) { spin_unlock_irqrestore(&cmd->t_state_lock, flags); + /* + * If COMPARE_AND_WRITE was stopped by __transport_wait_for_tasks(), + * release se_device->caw_sem obtained by sbc_compare_and_write() + * since target_complete_ok_work() or target_complete_failure_work() + * won't be called to invoke the normal CAW completion callbacks. + */ + if (cmd->se_cmd_flags & SCF_COMPARE_AND_WRITE) { + up(&dev->caw_sem); + } complete_all(&cmd->t_transport_stop_comp); return; } else if (!success) { |