aboutsummaryrefslogtreecommitdiffstats
path: root/mm/backing-dev.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2011-09-02 19:04:10 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-09-02 19:17:02 -0400
commit09f40f98bfa2ac22a332a713629a2f8f92896834 (patch)
tree92fac9d374b195845cd859206c7dfd110fce21fb /mm/backing-dev.c
parent5a042aa4b8e994a15d2c2ee750219971f0ab3905 (diff)
mm: Add comment explaining task state setting in bdi_forker_thread()
CC: Wu Fengguang <fengguang.wu@intel.com> CC: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r--mm/backing-dev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 94a047bb6c39..a87da524a4a0 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -401,6 +401,13 @@ static int bdi_forker_thread(void *ptr)
401 } 401 }
402 402
403 spin_lock_bh(&bdi_lock); 403 spin_lock_bh(&bdi_lock);
404 /*
405 * In the following loop we are going to check whether we have
406 * some work to do without any synchronization with tasks
407 * waking us up to do work for them. So we have to set task
408 * state already here so that we don't miss wakeups coming
409 * after we verify some condition.
410 */
404 set_current_state(TASK_INTERRUPTIBLE); 411 set_current_state(TASK_INTERRUPTIBLE);
405 412
406 list_for_each_entry(bdi, &bdi_list, bdi_list) { 413 list_for_each_entry(bdi, &bdi_list, bdi_list) {