Skip to content

Commit 51aef71

Browse files
ldr709martinkpetersen
authored andcommitted
scsi: snic: Replace spin_is_locked() with lockdep
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 <[email protected]> Cc: Karan Tilak Kumar <[email protected]> Cc: Sesidhar Baddela <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: "Martin K. Petersen" <[email protected]> Cc: <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent b51d577 commit 51aef71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/scsi/snic/snic_scsi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,7 +2001,7 @@ snic_dr_finish(struct snic *snic, struct scsi_cmnd *sc)
20012001
}
20022002

20032003
dr_failed:
2004-
SNIC_BUG_ON(!spin_is_locked(io_lock));
2004+
lockdep_assert_held(io_lock);
20052005
if (rqi)
20062006
CMD_SP(sc) = NULL;
20072007
spin_unlock_irqrestore(io_lock, flags);
@@ -2604,7 +2604,7 @@ snic_internal_abort_io(struct snic *snic, struct scsi_cmnd *sc, int tmf)
26042604
ret = SUCCESS;
26052605

26062606
skip_internal_abts:
2607-
SNIC_BUG_ON(!spin_is_locked(io_lock));
2607+
lockdep_assert_held(io_lock);
26082608
spin_unlock_irqrestore(io_lock, flags);
26092609

26102610
return ret;

0 commit comments

Comments
 (0)