Skip to contentSkip to conversation

target: core: fix warning on RT kernels

PATCH In review Maurizio Lombardi 2 participants 2 messages Jan 10, 2023 – Jan 11, 2023 SCSI target

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target: core: fix warning on RT kernels

calling spin_lock_irqsave() does not disable the interrupts on realtime kernels, remove the warning and replace assert_spin_locked() with lockdep_assert_held()

---
 drivers/target/target_core_tmr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/target/target_core_tmr.c +2 -2
index bac111456fa1..2b95b4550a63 100644
@@ -73,8 +73,8 @@ static bool __target_check_io_state(struct se_cmd *se_cmd,
 {
 	struct se_session *sess = se_cmd->se_sess;
 
-	assert_spin_locked(&sess->sess_cmd_lock);
-	WARN_ON_ONCE(!irqs_disabled());
+	lockdep_assert_held(&sess->sess_cmd_lock);
+
 	/*
 	 * If command already reached CMD_T_COMPLETE state within
 	 * target_complete_cmd() or CMD_T_FABRIC_STOP due to shutdown,
Signature · 1 line
2.31.1