Skip to content

Commit 7093515

Browse files
maurizio-lombardigregkh
authored andcommitted
scsi: target: core: Fix warning on RT kernels
[ Upstream commit 84ed64b ] Calling spin_lock_irqsave() does not disable the interrupts on realtime kernels, remove the warning and replace assert_spin_locked() with lockdep_assert_held(). Signed-off-by: Maurizio Lombardi <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent b7960f5 commit 7093515

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/target/target_core_tmr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ static bool __target_check_io_state(struct se_cmd *se_cmd,
7373
{
7474
struct se_session *sess = se_cmd->se_sess;
7575

76-
assert_spin_locked(&sess->sess_cmd_lock);
77-
WARN_ON_ONCE(!irqs_disabled());
76+
lockdep_assert_held(&sess->sess_cmd_lock);
77+
7878
/*
7979
* If command already reached CMD_T_COMPLETE state within
8080
* target_complete_cmd() or CMD_T_FABRIC_STOP due to shutdown,

0 commit comments

Comments
 (0)