flusher: Fix PF_FROZEN race

To touch task->flags directly is racy. thaw_process() still has race
(changing non_current->flags, but this is another issue) though, I think
it's much better off.

So, use thaw_process() instead.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
OGAWA Hirofumi 2009-12-03 13:49:43 +01:00 committed by Jens Axboe
parent 220d0b1dbf
commit bf7ec5bb61
1 changed files with 1 additions and 1 deletions

View File

@ -609,7 +609,7 @@ static void bdi_wb_shutdown(struct backing_dev_info *bdi)
* it would never exet if it is currently stuck in the refrigerator.
*/
list_for_each_entry(wb, &bdi->wb_list, list) {
wb->task->flags &= ~PF_FROZEN;
thaw_process(wb->task);
kthread_stop(wb->task);
}
}