mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
scsi: target/core: Avoid that a kernel oops is triggered when COMPARE AND WRITE fails
Fixes: aa73237dcb ("scsi: target/core: Always call transport_complete_callback() upon failure")
Reviewed-by: David Disseldorp <[email protected]>
Cc: Nicholas Bellinger <[email protected]>
Cc: Mike Christie <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
parent
651022382c
commit
5841734fa6
1 changed files with 2 additions and 2 deletions
|
|
@ -1778,7 +1778,7 @@ EXPORT_SYMBOL(target_submit_tmr);
|
|||
void transport_generic_request_failure(struct se_cmd *cmd,
|
||||
sense_reason_t sense_reason)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret = 0, post_ret;
|
||||
|
||||
pr_debug("-----[ Storage Engine Exception; sense_reason %d\n",
|
||||
sense_reason);
|
||||
|
|
@ -1790,7 +1790,7 @@ void transport_generic_request_failure(struct se_cmd *cmd,
|
|||
transport_complete_task_attr(cmd);
|
||||
|
||||
if (cmd->transport_complete_callback)
|
||||
cmd->transport_complete_callback(cmd, false, NULL);
|
||||
cmd->transport_complete_callback(cmd, false, &post_ret);
|
||||
|
||||
if (transport_check_aborted_status(cmd, 1))
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue