scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found
authorBodo Stroesser <bostroesser@gmail.com>
Fri, 23 Apr 2021 15:01:23 +0000 (17:01 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 29 Apr 2021 02:55:00 +0000 (22:55 -0400)
commit9814b55cde0588b6d9bc496cee43f87316cbc6f1
tree63925f04edb5d656d374c7b253011a926b56bd95
parent2f1137140fbcffad582d9e5eacc7f189ae0cc110
scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found

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/20210423150123.24468-1-bostroesser@gmail.com
Signed-off-by: Bodo Stroesser <bostroesser@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_user.c