From: Martin Wilck <mwilck@xxxxxxxx> This reverts commit c3b6a1d397420a0fdd97af2f06abfb78adc370df. Aborting the sleep was risky, because after return from qlt_free_session_done() the driver starts freeing resources, which is dangerous while we know that there's pending IO. The previous patch "scsi: qla2xxx: check UNLOADING before posting async work" avoids sending this IO in the first place, and thus obsoletes the dangerous timeout. Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- drivers/scsi/qla2xxx/qla_target.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 622e733..eec1338 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -1019,7 +1019,6 @@ void qlt_free_session_done(struct work_struct *work) if (logout_started) { bool traced = false; - u16 cnt = 0; while (!READ_ONCE(sess->logout_completed)) { if (!traced) { @@ -1029,9 +1028,6 @@ void qlt_free_session_done(struct work_struct *work) traced = true; } msleep(100); - cnt++; - if (cnt > 200) - break; } ql_dbg(ql_dbg_disc, vha, 0xf087, -- 2.25.1