mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
writeback: simplify and split bdi_start_writeback
bdi_start_writeback now never gets a superblock passed, so we can just remove that case. And to further untangle the code and flatten the call stack split it into two trivial helpers for it's two callers. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
b8c2f3474f
commit
c5444198ca
3 changed files with 24 additions and 17 deletions
|
|
@ -597,7 +597,7 @@ static void balance_dirty_pages(struct address_space *mapping,
|
|||
(!laptop_mode && ((global_page_state(NR_FILE_DIRTY)
|
||||
+ global_page_state(NR_UNSTABLE_NFS))
|
||||
> background_thresh)))
|
||||
bdi_start_writeback(bdi, NULL, 0);
|
||||
bdi_start_background_writeback(bdi);
|
||||
}
|
||||
|
||||
void set_page_dirty_balance(struct page *page, int page_mkwrite)
|
||||
|
|
@ -705,9 +705,8 @@ void laptop_mode_timer_fn(unsigned long data)
|
|||
* We want to write everything out, not just down to the dirty
|
||||
* threshold
|
||||
*/
|
||||
|
||||
if (bdi_has_dirty_io(&q->backing_dev_info))
|
||||
bdi_start_writeback(&q->backing_dev_info, NULL, nr_pages);
|
||||
bdi_start_writeback(&q->backing_dev_info, nr_pages);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue