Skip to content

Commit

Permalink
writeback: fix bdi_writeback iteration in wakeup_dirtytime_writeback()
Browse files Browse the repository at this point in the history
wakeup_dirtytime_writeback() walks and wakes up all wb's of all bdi's;
unfortunately, it was always waking up bdi->wb instead of the wb being
walked.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 001fe6f ("writeback: make wakeup_dirtytime_writeback() handle multiple bdi_writeback's")
Reviewed-by: Jan Kara <jack@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
htejun authored and axboe committed Oct 12, 2015
1 parent 9ad18ab commit 6fdf860
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -1897,8 +1897,8 @@ static void wakeup_dirtytime_writeback(struct work_struct *w)
struct wb_iter iter;

bdi_for_each_wb(wb, bdi, &iter, 0)
if (!list_empty(&bdi->wb.b_dirty_time))
wb_wakeup(&bdi->wb);
if (!list_empty(&wb->b_dirty_time))
wb_wakeup(wb);
}
rcu_read_unlock();
schedule_delayed_work(&dirtytime_work, dirtytime_expire_interval * HZ);
Expand Down

0 comments on commit 6fdf860

Please sign in to comment.