Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 001fe6f6 authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe
Browse files

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: default avatarTejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jan Kara <jack@suse.cz>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent f2b65121
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1260,8 +1260,11 @@ 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;
		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();