mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found
[ Upstream commit 9814b55cde0588b6d9bc496cee43f87316cbc6f1 ] If tcmu_handle_completions() finds an invalid cmd_id while looping over cmd responses from userspace it sets TCMU_DEV_BIT_BROKEN and breaks the loop. This means that it does further handling for the tcmu device. Skip that handling by replacing 'break' with 'return'. Additionally change tcmu_handle_completions() from unsigned int to bool, since the value used in return already is bool. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bodo Stroesser <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
e39a105abb
commit
c5946eb52b
1 changed files with 2 additions and 2 deletions
|
|
@ -1205,7 +1205,7 @@ static void tcmu_set_next_deadline(struct list_head *queue,
|
|||
del_timer(timer);
|
||||
}
|
||||
|
||||
static unsigned int tcmu_handle_completions(struct tcmu_dev *udev)
|
||||
static bool tcmu_handle_completions(struct tcmu_dev *udev)
|
||||
{
|
||||
struct tcmu_mailbox *mb;
|
||||
struct tcmu_cmd *cmd;
|
||||
|
|
@ -1245,7 +1245,7 @@ static unsigned int tcmu_handle_completions(struct tcmu_dev *udev)
|
|||
pr_err("cmd_id %u not found, ring is broken\n",
|
||||
entry->hdr.cmd_id);
|
||||
set_bit(TCMU_DEV_BIT_BROKEN, &udev->flags);
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
|
||||
tcmu_handle_completion(cmd, entry);
|
||||
|
|
|
|||
Loading…
Reference in a new issue