提交 51aef716 编写于 作者: L Lance Roy 提交者: Martin K. Petersen

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: NLance 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>
Reviewed-by: NBart Van Assche <bvanassche@acm.org>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 b51d577a
...@@ -2001,7 +2001,7 @@ snic_dr_finish(struct snic *snic, struct scsi_cmnd *sc) ...@@ -2001,7 +2001,7 @@ snic_dr_finish(struct snic *snic, struct scsi_cmnd *sc)
} }
dr_failed: dr_failed:
SNIC_BUG_ON(!spin_is_locked(io_lock)); lockdep_assert_held(io_lock);
if (rqi) if (rqi)
CMD_SP(sc) = NULL; CMD_SP(sc) = NULL;
spin_unlock_irqrestore(io_lock, flags); spin_unlock_irqrestore(io_lock, flags);
...@@ -2604,7 +2604,7 @@ snic_internal_abort_io(struct snic *snic, struct scsi_cmnd *sc, int tmf) ...@@ -2604,7 +2604,7 @@ snic_internal_abort_io(struct snic *snic, struct scsi_cmnd *sc, int tmf)
ret = SUCCESS; ret = SUCCESS;
skip_internal_abts: skip_internal_abts:
SNIC_BUG_ON(!spin_is_locked(io_lock)); lockdep_assert_held(io_lock);
spin_unlock_irqrestore(io_lock, flags); spin_unlock_irqrestore(io_lock, flags);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册