Skip to content

Commit 515da6f

Browse files
maurizio-lombardimartinkpetersen
authored andcommitted
scsi: target: core: Fix warning on realtime kernels
On realtime kernels, spin_lock_irq*(spinlock_t) do not disable the interrupts, a call to irqs_disabled() will return false thus firing a warning in __transport_wait_for_tasks(). Remove the warning and also replace assert_spin_locked() with lockdep_assert_held() Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Maurizio Lombardi <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 2ef7665 commit 515da6f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/target/target_core_transport.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3121,9 +3121,7 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
31213121
__releases(&cmd->t_state_lock)
31223122
__acquires(&cmd->t_state_lock)
31233123
{
3124-
3125-
assert_spin_locked(&cmd->t_state_lock);
3126-
WARN_ON_ONCE(!irqs_disabled());
3124+
lockdep_assert_held(&cmd->t_state_lock);
31273125

31283126
if (fabric_stop)
31293127
cmd->transport_state |= CMD_T_FABRIC_STOP;

0 commit comments

Comments
 (0)