aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-06-08 12:15:15 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-06-11 06:58:08 -0400
commitc5444198ca210498e8ac0ba121b4cd3537aa12f7 (patch)
treec423d38fe1ac7f51a48e455a19ecbe2354811fca /mm
parentb8c2f3474f1077599ec6e90c2f263f17055cc3d8 (diff)
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 <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'mm')
-rw-r--r--mm/page-writeback.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index bbd396ac9546..54f28bd493d3 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -597,7 +597,7 @@ static void balance_dirty_pages(struct address_space *mapping,
597 (!laptop_mode && ((global_page_state(NR_FILE_DIRTY) 597 (!laptop_mode && ((global_page_state(NR_FILE_DIRTY)
598 + global_page_state(NR_UNSTABLE_NFS)) 598 + global_page_state(NR_UNSTABLE_NFS))
599 > background_thresh))) 599 > background_thresh)))
600 bdi_start_writeback(bdi, NULL, 0); 600 bdi_start_background_writeback(bdi);
601} 601}
602 602
603void set_page_dirty_balance(struct page *page, int page_mkwrite) 603void set_page_dirty_balance(struct page *page, int page_mkwrite)
@@ -705,9 +705,8 @@ void laptop_mode_timer_fn(unsigned long data)
705 * We want to write everything out, not just down to the dirty 705 * We want to write everything out, not just down to the dirty
706 * threshold 706 * threshold
707 */ 707 */
708
709 if (bdi_has_dirty_io(&q->backing_dev_info)) 708 if (bdi_has_dirty_io(&q->backing_dev_info))
710 bdi_start_writeback(&q->backing_dev_info, NULL, nr_pages); 709 bdi_start_writeback(&q->backing_dev_info, nr_pages);
711} 710}
712 711
713/* 712/*