diff options
author | Maurizio Lombardi <mlombard@redhat.com> | 2021-05-31 14:13:26 +0200 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2021-06-30 08:49:11 -0400 |
commit | 02c1b02b69b5292dd3e7e9634b0fa21abab411e3 (patch) | |
tree | aced1cbc0ef7c6b0f5a0f163a5e8132c04a485e3 /drivers/target | |
parent | 92869945cc5b78ee8a1ef90336fe070893e3458a (diff) | |
download | linux-stable-02c1b02b69b5292dd3e7e9634b0fa21abab411e3.tar.gz linux-stable-02c1b02b69b5292dd3e7e9634b0fa21abab411e3.tar.bz2 linux-stable-02c1b02b69b5292dd3e7e9634b0fa21abab411e3.zip |
scsi: target: core: Fix warning on realtime kernels
[ Upstream commit 515da6f4295c2c42b8c54572cce3d2dd1167c41e ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_transport.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index ecd707f74ddc..6afb65387be6 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2779,9 +2779,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; |