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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 44720363374c..2adb89959885 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1022,17 +1022,15 @@ int test_set_page_writeback(struct page *page)
1022EXPORT_SYMBOL(test_set_page_writeback); 1022EXPORT_SYMBOL(test_set_page_writeback);
1023 1023
1024/* 1024/*
1025 * Return true if any of the pages in the mapping are marged with the 1025 * Return true if any of the pages in the mapping are marked with the
1026 * passed tag. 1026 * passed tag.
1027 */ 1027 */
1028int mapping_tagged(struct address_space *mapping, int tag) 1028int mapping_tagged(struct address_space *mapping, int tag)
1029{ 1029{
1030 unsigned long flags;
1031 int ret; 1030 int ret;
1032 1031 rcu_read_lock();
1033 read_lock_irqsave(&mapping->tree_lock, flags);
1034 ret = radix_tree_tagged(&mapping->page_tree, tag); 1032 ret = radix_tree_tagged(&mapping->page_tree, tag);
1035 read_unlock_irqrestore(&mapping->tree_lock, flags); 1033 rcu_read_unlock();
1036 return ret; 1034 return ret;
1037} 1035}
1038EXPORT_SYMBOL(mapping_tagged); 1036EXPORT_SYMBOL(mapping_tagged);