diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2015-01-22 12:38:11 -0500 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-05-27 19:39:52 +0200 |
| commit | c800f6f41d3ef7d86fbeb42c65d892df5ea4d02c (patch) | |
| tree | 38a51d8ac5ed1aad46da9c1b0a03ecf1d7219e28 /mm | |
| parent | 088cb00b882f95b49b814b0ab7413f35b14dd33f (diff) | |
ext4: backport mm portion of: fix data integrity sync in ordered mode
Commit 1c8349a17137: "ext4: fix data integrity sync in ordered mode"
included changes to include/linux/page-flags.h and
mm/page-writeback.c. Apply them as part of the 3.18 ext4 backport.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/page-writeback.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 784472640..353a2b5e3 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2268,7 +2268,7 @@ int test_clear_page_writeback(struct page *page) return ret; } -int test_set_page_writeback(struct page *page) +int __test_set_page_writeback(struct page *page, bool keep_write) { struct address_space *mapping = page_mapping(page); int ret; @@ -2290,9 +2290,10 @@ int test_set_page_writeback(struct page *page) radix_tree_tag_clear(&mapping->page_tree, page_index(page), PAGECACHE_TAG_DIRTY); - radix_tree_tag_clear(&mapping->page_tree, - page_index(page), - PAGECACHE_TAG_TOWRITE); + if (!keep_write) + radix_tree_tag_clear(&mapping->page_tree, + page_index(page), + PAGECACHE_TAG_TOWRITE); spin_unlock_irqrestore(&mapping->tree_lock, flags); } else { ret = TestSetPageWriteback(page); @@ -2302,7 +2303,7 @@ int test_set_page_writeback(struct page *page) return ret; } -EXPORT_SYMBOL(test_set_page_writeback); +EXPORT_SYMBOL(__test_set_page_writeback); /* * Return true if any of the pages in the mapping are marked with the |
