summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMaurizio Lombardi <mlombard@redhat.com>2021-05-31 14:13:26 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-05-31 22:59:13 -0400
commit515da6f4295c2c42b8c54572cce3d2dd1167c41e (patch)
tree8eb5167cddd810a04118d9edf4f5edbfc613ed63 /drivers
parent2ef7665dfd88830f15415ba007c7c9a46be7acd8 (diff)
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/20210531121326.3649-1-mlombard@redhat.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/target/target_core_transport.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 05d7ffd59df6..7e35eddd9eb7 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -3121,9 +3121,7 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
__releases(&cmd->t_state_lock)
__acquires(&cmd->t_state_lock)
{
-
- assert_spin_locked(&cmd->t_state_lock);
- WARN_ON_ONCE(!irqs_disabled());
+ lockdep_assert_held(&cmd->t_state_lock);
if (fabric_stop)
cmd->transport_state |= CMD_T_FABRIC_STOP;