X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=mm%2Fpage-writeback.c;fp=mm%2Fpage-writeback.c;h=b3a198c9248d7947e7e3a929848431f7fbcb5954;hb=fba2591bf4e418b6c3f9f8794c9dd8fe40ae7bd9;hp=237107c1b0847d79e6139daf5c811ea1c432c087;hpb=46d2277c796f9f4937bfa668c40b2e3f43e93dd0;p=powerpc.git diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 237107c1b0..b3a198c924 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -844,38 +844,6 @@ int set_page_dirty_lock(struct page *page) } EXPORT_SYMBOL(set_page_dirty_lock); -/* - * Clear a page's dirty flag, while caring for dirty memory accounting. - * Returns true if the page was previously dirty. - */ -int test_clear_page_dirty(struct page *page) -{ - struct address_space *mapping = page_mapping(page); - unsigned long flags; - - if (!mapping) - return TestClearPageDirty(page); - - write_lock_irqsave(&mapping->tree_lock, flags); - if (TestClearPageDirty(page)) { - radix_tree_tag_clear(&mapping->page_tree, - page_index(page), PAGECACHE_TAG_DIRTY); - write_unlock_irqrestore(&mapping->tree_lock, flags); - /* - * We can continue to use `mapping' here because the - * page is locked, which pins the address_space - */ - if (mapping_cap_account_dirty(mapping)) { - page_mkclean(page); - dec_zone_page_state(page, NR_FILE_DIRTY); - } - return 1; - } - write_unlock_irqrestore(&mapping->tree_lock, flags); - return 0; -} -EXPORT_SYMBOL(test_clear_page_dirty); - /* * Clear a page's dirty flag, while caring for dirty memory accounting. * Returns true if the page was previously dirty.