Skip to content

Commit 84ed64b

Browse files
maurizio-lombardimartinkpetersen
authored andcommitted
scsi: 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(). Signed-off-by: Maurizio Lombardi <mlombard@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20230110125310.55884-1-mlombard@redhat.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent f58c897 commit 84ed64b

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)