Skip to content

Commit

Permalink
flusher: Fix PF_FROZEN race
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
OGAWAHirofumi authored and Jens Axboe committed Dec 3, 2009
1 parent 220d0b1 commit bf7ec5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/backing-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit bf7ec5b

Please sign in to comment.