aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 1c87430b7a25..b9f4c6f1be86 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -244,6 +244,16 @@ static void balance_dirty_pages(struct address_space *mapping)
244 pdflush_operation(background_writeout, 0); 244 pdflush_operation(background_writeout, 0);
245} 245}
246 246
247void set_page_dirty_balance(struct page *page)
248{
249 if (set_page_dirty(page)) {
250 struct address_space *mapping = page_mapping(page);
251
252 if (mapping)
253 balance_dirty_pages_ratelimited(mapping);
254 }
255}
256
247/** 257/**
248 * balance_dirty_pages_ratelimited_nr - balance dirty memory state 258 * balance_dirty_pages_ratelimited_nr - balance dirty memory state
249 * @mapping: address_space which was dirtied 259 * @mapping: address_space which was dirtied