aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 20:38:49 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 20:38:49 -0500
commit7c2db36e730ee4facd341679ecb21ee73ba92831 (patch)
tree75016fba72aaf0581b9263f7fa4c565e6e634f3c /mm/page-writeback.c
parent8b5628ab83b671f96ac9f174c1bd51c92589fc82 (diff)
parenta47a376f1c025e23e836c0376813c0424de665c2 (diff)
Merge branch 'akpm' (incoming from Andrew)
Merge misc patches from Andrew Morton: - Florian has vanished so I appear to have become fbdev maintainer again :( - Joel and Mark are distracted to welcome to the new OCFS2 maintainer - The backlight queue - Small core kernel changes - lib/ updates - The rtc queue - Various random bits * akpm: (164 commits) rtc: rtc-davinci: use devm_*() functions rtc: rtc-max8997: use devm_request_threaded_irq() rtc: rtc-max8907: use devm_request_threaded_irq() rtc: rtc-da9052: use devm_request_threaded_irq() rtc: rtc-wm831x: use devm_request_threaded_irq() rtc: rtc-tps80031: use devm_request_threaded_irq() rtc: rtc-lp8788: use devm_request_threaded_irq() rtc: rtc-coh901331: use devm_clk_get() rtc: rtc-vt8500: use devm_*() functions rtc: rtc-tps6586x: use devm_request_threaded_irq() rtc: rtc-imxdi: use devm_clk_get() rtc: rtc-cmos: use dev_warn()/dev_dbg() instead of printk()/pr_debug() rtc: rtc-pcf8583: use dev_warn() instead of printk() rtc: rtc-sun4v: use pr_warn() instead of printk() rtc: rtc-vr41xx: use dev_info() instead of printk() rtc: rtc-rs5c313: use pr_err() instead of printk() rtc: rtc-at91rm9200: use dev_dbg()/dev_err() instead of printk()/pr_debug() rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug() rtc: rtc-ds2404: use dev_err() instead of printk() rtc: rtc-efi: use dev_err()/dev_warn()/pr_err() instead of printk() ...
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 66a0024becd9..7300c9d5e1d9 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2290,3 +2290,27 @@ int mapping_tagged(struct address_space *mapping, int tag)
2290 return radix_tree_tagged(&mapping->page_tree, tag); 2290 return radix_tree_tagged(&mapping->page_tree, tag);
2291} 2291}
2292EXPORT_SYMBOL(mapping_tagged); 2292EXPORT_SYMBOL(mapping_tagged);
2293
2294/**
2295 * wait_for_stable_page() - wait for writeback to finish, if necessary.
2296 * @page: The page to wait on.
2297 *
2298 * This function determines if the given page is related to a backing device
2299 * that requires page contents to be held stable during writeback. If so, then
2300 * it will wait for any pending writeback to complete.
2301 */
2302void wait_for_stable_page(struct page *page)
2303{
2304 struct address_space *mapping = page_mapping(page);
2305 struct backing_dev_info *bdi = mapping->backing_dev_info;
2306
2307 if (!bdi_cap_stable_pages_required(bdi))
2308 return;
2309#ifdef CONFIG_NEED_BOUNCE_POOL
2310 if (mapping->host->i_sb->s_flags & MS_SNAP_STABLE)
2311 return;
2312#endif /* CONFIG_NEED_BOUNCE_POOL */
2313
2314 wait_on_page_writeback(page);
2315}
2316EXPORT_SYMBOL_GPL(wait_for_stable_page);