diff options
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 237107c1b084..b3a198c9248d 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -845,38 +845,6 @@ int set_page_dirty_lock(struct page *page) | |||
845 | EXPORT_SYMBOL(set_page_dirty_lock); | 845 | EXPORT_SYMBOL(set_page_dirty_lock); |
846 | 846 | ||
847 | /* | 847 | /* |
848 | * Clear a page's dirty flag, while caring for dirty memory accounting. | ||
849 | * Returns true if the page was previously dirty. | ||
850 | */ | ||
851 | int test_clear_page_dirty(struct page *page) | ||
852 | { | ||
853 | struct address_space *mapping = page_mapping(page); | ||
854 | unsigned long flags; | ||
855 | |||
856 | if (!mapping) | ||
857 | return TestClearPageDirty(page); | ||
858 | |||
859 | write_lock_irqsave(&mapping->tree_lock, flags); | ||
860 | if (TestClearPageDirty(page)) { | ||
861 | radix_tree_tag_clear(&mapping->page_tree, | ||
862 | page_index(page), PAGECACHE_TAG_DIRTY); | ||
863 | write_unlock_irqrestore(&mapping->tree_lock, flags); | ||
864 | /* | ||
865 | * We can continue to use `mapping' here because the | ||
866 | * page is locked, which pins the address_space | ||
867 | */ | ||
868 | if (mapping_cap_account_dirty(mapping)) { | ||
869 | page_mkclean(page); | ||
870 | dec_zone_page_state(page, NR_FILE_DIRTY); | ||
871 | } | ||
872 | return 1; | ||
873 | } | ||
874 | write_unlock_irqrestore(&mapping->tree_lock, flags); | ||
875 | return 0; | ||
876 | } | ||
877 | EXPORT_SYMBOL(test_clear_page_dirty); | ||
878 | |||
879 | /* | ||
880 | * Clear a page's dirty flag, while caring for dirty memory accounting. | 848 | * Clear a page's dirty flag, while caring for dirty memory accounting. |
881 | * Returns true if the page was previously dirty. | 849 | * Returns true if the page was previously dirty. |
882 | * | 850 | * |