Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mike Christie and committed by
Martin K. Petersen
40863cb9 9b7c13b8

+1 -1
+1 -1
drivers/target/target_core_iblock.c
··· 889 889 890 890 ret = ops->pr_preempt(bdev, key, sa_key, 891 891 scsi_pr_type_to_block(type), 892 - sa == PRO_PREEMPT ? false : true); 892 + sa == PRO_PREEMPT_AND_ABORT); 893 893 break; 894 894 case PRO_RELEASE: 895 895 if (!ops->pr_clear) {