scsi: target: tcm_qla2xxx: Remove BUG_ON(in_interrupt())
authorAhmed S. Darwish <a.darwish@linutronix.de>
Thu, 26 Nov 2020 13:29:43 +0000 (14:29 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 1 Dec 2020 05:03:52 +0000 (00:03 -0500)
commit9fef41f25d60d3cb22ee81d5d92cdea99a1b35ea
tree2a767e622154c665a3a6543ac3720d98b8e52e72
parent8ac246bdd07a0f948f0e33eb4797bd2645cd8224
scsi: target: tcm_qla2xxx: Remove BUG_ON(in_interrupt())

tcm_qla2xxx_free_session() has a BUG_ON(in_interrupt()).

While in_interrupt() is ill-defined and does not provide what the name
suggests, it is not needed here: the function is always invoked from
workqueue context through "struct qla_tgt_func_tmpl" ->free_session() hook
it is bound to.

The function also calls wait_event_timeout() down the chain, which already
has a might_sleep().

Remove the in_interrupt() check.

Link: https://lore.kernel.org/r/20201126132952.2287996-6-bigeasy@linutronix.de
Cc: Nilesh Javali <njavali@marvell.com>
Cc: <GR-QLogic-Storage-Upstream@marvell.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/tcm_qla2xxx.c