Commit 3cb0643a authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Martin K. Petersen

scsi: qla2xxx: Avoid flush_scheduled_work() usage

Although qla2xxx driver is calling schedule_{,delayed}_work() from 10
locations, I assume that flush_scheduled_work() from qlt_stop_phase1()
needs to flush only works scheduled by qlt_sched_sess_work(), for this loop
continues while "struct qla_tgt"->sess_works_list is not empty.

Link: https://lore.kernel.org/r/133c6723-90b6-5c8b-72b4-cc01eeb3a8c0@I-love.SAKURA.ne.jpTested-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a4345557
......@@ -1559,7 +1559,7 @@ int qlt_stop_phase1(struct qla_tgt *tgt)
spin_lock_irqsave(&tgt->sess_work_lock, flags);
do {
spin_unlock_irqrestore(&tgt->sess_work_lock, flags);
flush_scheduled_work();
flush_work(&tgt->sess_work);
spin_lock_irqsave(&tgt->sess_work_lock, flags);
} while (!list_empty(&tgt->sess_works_list));
spin_unlock_irqrestore(&tgt->sess_work_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment