* [PATCH 09/16] scsi: Replace spin_is_locked() with lockdep
[not found] <20181003053902.6910-1-ldr709@gmail.com>
@ 2018-10-03 5:38 ` Lance Roy
2018-10-03 13:53 ` Bart Van Assche
2018-10-11 2:37 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Lance Roy @ 2018-10-03 5:38 UTC (permalink / raw)
To: linux-kernel
Cc: Paul E. McKenney, Lance Roy, Karan Tilak Kumar, Sesidhar Baddela,
James E.J. Bottomley, Martin K. Petersen, linux-scsi
lockdep_assert_held() is better suited to checking locking requirements,
since it won't get confused when someone else holds the lock. This is
also a step towards possibly removing spin_is_locked().
Signed-off-by: Lance Roy <ldr709@gmail.com>
Cc: Karan Tilak Kumar <kartilak@cisco.com>
Cc: Sesidhar Baddela <sebaddel@cisco.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>
---
drivers/scsi/snic/snic_scsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/snic/snic_scsi.c b/drivers/scsi/snic/snic_scsi.c
index d9b2e46424aa..42e485139fc9 100644
--- a/drivers/scsi/snic/snic_scsi.c
+++ b/drivers/scsi/snic/snic_scsi.c
@@ -2001,7 +2001,7 @@ snic_dr_finish(struct snic *snic, struct scsi_cmnd *sc)
}
dr_failed:
- SNIC_BUG_ON(!spin_is_locked(io_lock));
+ lockdep_assert_held(io_lock);
if (rqi)
CMD_SP(sc) = NULL;
spin_unlock_irqrestore(io_lock, flags);
@@ -2604,7 +2604,7 @@ snic_internal_abort_io(struct snic *snic, struct scsi_cmnd *sc, int tmf)
ret = SUCCESS;
skip_internal_abts:
- SNIC_BUG_ON(!spin_is_locked(io_lock));
+ lockdep_assert_held(io_lock);
spin_unlock_irqrestore(io_lock, flags);
return ret;
--
2.19.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 09/16] scsi: Replace spin_is_locked() with lockdep
2018-10-03 5:38 ` [PATCH 09/16] scsi: Replace spin_is_locked() with lockdep Lance Roy
@ 2018-10-03 13:53 ` Bart Van Assche
2018-10-11 2:37 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2018-10-03 13:53 UTC (permalink / raw)
To: Lance Roy, linux-kernel
Cc: Paul E. McKenney, Karan Tilak Kumar, Sesidhar Baddela,
James E.J. Bottomley, Martin K. Petersen, linux-scsi
On 10/2/18 10:38 PM, Lance Roy wrote:
> lockdep_assert_held() is better suited to checking locking requirements,
> since it won't get confused when someone else holds the lock. This is
> also a step towards possibly removing spin_is_locked().
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 09/16] scsi: Replace spin_is_locked() with lockdep
2018-10-03 5:38 ` [PATCH 09/16] scsi: Replace spin_is_locked() with lockdep Lance Roy
2018-10-03 13:53 ` Bart Van Assche
@ 2018-10-11 2:37 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-10-11 2:37 UTC (permalink / raw)
To: Lance Roy
Cc: linux-kernel, Paul E. McKenney, Karan Tilak Kumar,
Sesidhar Baddela, James E.J. Bottomley, Martin K. Petersen,
linux-scsi
Lance,
> lockdep_assert_held() is better suited to checking locking
> requirements, since it won't get confused when someone else holds the
> lock. This is also a step towards possibly removing spin_is_locked().
Applied to 4.20/scsi-queue, thank you!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-11 2:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20181003053902.6910-1-ldr709@gmail.com>
2018-10-03 5:38 ` [PATCH 09/16] scsi: Replace spin_is_locked() with lockdep Lance Roy
2018-10-03 13:53 ` Bart Van Assche
2018-10-11 2:37 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox