Skip to content

Commit

Permalink
scsi: target: tcm_qla2xxx: Remove BUG_ON(in_interrupt())
Browse files Browse the repository at this point in the history
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/[email protected]
Cc: Nilesh Javali <[email protected]>
Cc: <[email protected]>
Reviewed-by: Himanshu Madhani <[email protected]>
Reviewed-by: Daniel Wagner <[email protected]>
Signed-off-by: Ahmed S. Darwish <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
a-darwish authored and martinkpetersen committed Dec 1, 2020
1 parent 8ac246b commit 9fef41f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/scsi/qla2xxx/tcm_qla2xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1400,8 +1400,6 @@ static void tcm_qla2xxx_free_session(struct fc_port *sess)
struct se_session *se_sess;
struct tcm_qla2xxx_lport *lport;

BUG_ON(in_interrupt());

se_sess = sess->se_sess;
if (!se_sess) {
pr_err("struct fc_port->se_sess is NULL\n");
Expand Down

0 comments on commit 9fef41f

Please sign in to comment.