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

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>

authored by

Maurizio Lombardi and committed by
Martin K. Petersen
84ed64b1 f58c8970

+2 -2
+2 -2
drivers/target/target_core_tmr.c
··· 73 73 { 74 74 struct se_session *sess = se_cmd->se_sess; 75 75 76 - assert_spin_locked(&sess->sess_cmd_lock); 77 - WARN_ON_ONCE(!irqs_disabled()); 76 + lockdep_assert_held(&sess->sess_cmd_lock); 77 + 78 78 /* 79 79 * If command already reached CMD_T_COMPLETE state within 80 80 * target_complete_cmd() or CMD_T_FABRIC_STOP due to shutdown,