SCSI target development
 help / color / mirror / Atom feed
* [PATCH 1/1] scsi: target: Quiet bool conversion warning with pr_preempt use
@ 2023-06-23 16:11 Mike Christie
  2023-06-27  8:18 ` Maurizio Lombardi
  2023-06-29  1:58 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Christie @ 2023-06-23 16:11 UTC (permalink / raw)
  To: martin.petersen, linux-scsi, target-devel
  Cc: Mike Christie, kernel test robot

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>
---
 drivers/target/target_core_iblock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index a3c5f3558a33..3d1b511ea284 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -888,7 +888,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) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-29  1:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-23 16:11 [PATCH 1/1] scsi: target: Quiet bool conversion warning with pr_preempt use Mike Christie
2023-06-27  8:18 ` Maurizio Lombardi
2023-06-29  1:58 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox