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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 7d9a4ef0a078..518e2c3f4c75 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2380,7 +2380,7 @@ int test_clear_page_writeback(struct page *page)
2380 return ret; 2380 return ret;
2381} 2381}
2382 2382
2383int test_set_page_writeback(struct page *page) 2383int __test_set_page_writeback(struct page *page, bool keep_write)
2384{ 2384{
2385 struct address_space *mapping = page_mapping(page); 2385 struct address_space *mapping = page_mapping(page);
2386 int ret; 2386 int ret;
@@ -2405,9 +2405,10 @@ int test_set_page_writeback(struct page *page)
2405 radix_tree_tag_clear(&mapping->page_tree, 2405 radix_tree_tag_clear(&mapping->page_tree,
2406 page_index(page), 2406 page_index(page),
2407 PAGECACHE_TAG_DIRTY); 2407 PAGECACHE_TAG_DIRTY);
2408 radix_tree_tag_clear(&mapping->page_tree, 2408 if (!keep_write)
2409 page_index(page), 2409 radix_tree_tag_clear(&mapping->page_tree,
2410 PAGECACHE_TAG_TOWRITE); 2410 page_index(page),
2411 PAGECACHE_TAG_TOWRITE);
2411 spin_unlock_irqrestore(&mapping->tree_lock, flags); 2412 spin_unlock_irqrestore(&mapping->tree_lock, flags);
2412 } else { 2413 } else {
2413 ret = TestSetPageWriteback(page); 2414 ret = TestSetPageWriteback(page);
@@ -2418,7 +2419,7 @@ int test_set_page_writeback(struct page *page)
2418 return ret; 2419 return ret;
2419 2420
2420} 2421}
2421EXPORT_SYMBOL(test_set_page_writeback); 2422EXPORT_SYMBOL(__test_set_page_writeback);
2422 2423
2423/* 2424/*
2424 * Return true if any of the pages in the mapping are marked with the 2425 * Return true if any of the pages in the mapping are marked with the