scsi: target: iblock: Quiet bool conversion warning with pr_preempt use

We want to pass in true for pr_preempt's argument if we are doing a
PRO_PREEMPT_AND_ABORT, so just test sa against PRO_PREEMPT_AND_ABORT, and
pass the result directly to pr_preempt.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306221655.Kwtqi1gI-lkp@intel.com/
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20230623161136.6270-1-michael.christie@oracle.com
Reviewed-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Mike Christie 2023-06-23 11:11:36 -05:00 committed by Martin K. Petersen
parent 9b7c13b83c
commit 40863cb945
1 changed files with 1 additions and 1 deletions

View File

@ -889,7 +889,7 @@ static sense_reason_t iblock_execute_pr_out(struct se_cmd *cmd, u8 sa, u64 key,
ret = ops->pr_preempt(bdev, key, sa_key,
scsi_pr_type_to_block(type),
sa == PRO_PREEMPT ? false : true);
sa == PRO_PREEMPT_AND_ABORT);
break;
case PRO_RELEASE:
if (!ops->pr_clear) {