From: Tejun Heo Date: Fri, 22 May 2015 21:13:56 +0000 (-0400) Subject: writeback: make wakeup_dirtytime_writeback() handle multiple bdi_writeback's X-Git-Tag: firefly_0821_release~176^2~1570^2~43 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=001fe6f617b1a352ad29cc3643384b3d8141dc07;p=firefly-linux-kernel-4.4.55.git writeback: make wakeup_dirtytime_writeback() handle multiple bdi_writeback's wakeup_dirtytime_writeback() currently only starts writeback on the root wb (bdi_writeback). For cgroup writeback support, update the function to check all wbs. Signed-off-by: Tejun Heo Cc: Jens Axboe Cc: Jan Kara Cc: Theodore Ts'o Signed-off-by: Jens Axboe --- diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 508e10cc3fcd..8ae212e90ec3 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1260,9 +1260,12 @@ static void wakeup_dirtytime_writeback(struct work_struct *w) rcu_read_lock(); list_for_each_entry_rcu(bdi, &bdi_list, bdi_list) { - if (list_empty(&bdi->wb.b_dirty_time)) - continue; - wb_wakeup(&bdi->wb); + struct bdi_writeback *wb; + struct wb_iter iter; + + bdi_for_each_wb(wb, bdi, &iter, 0) + if (!list_empty(&bdi->wb.b_dirty_time)) + wb_wakeup(&bdi->wb); } rcu_read_unlock(); schedule_delayed_work(&dirtytime_work, dirtytime_expire_interval * HZ);