aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/page-writeback.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 5a06d4cb9a3d..73cbc5dc150b 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2026,11 +2026,12 @@ int __set_page_dirty_nobuffers(struct page *page)
2026 if (!TestSetPageDirty(page)) { 2026 if (!TestSetPageDirty(page)) {
2027 struct address_space *mapping = page_mapping(page); 2027 struct address_space *mapping = page_mapping(page);
2028 struct address_space *mapping2; 2028 struct address_space *mapping2;
2029 unsigned long flags;
2029 2030
2030 if (!mapping) 2031 if (!mapping)
2031 return 1; 2032 return 1;
2032 2033
2033 spin_lock_irq(&mapping->tree_lock); 2034 spin_lock_irqsave(&mapping->tree_lock, flags);
2034 mapping2 = page_mapping(page); 2035 mapping2 = page_mapping(page);
2035 if (mapping2) { /* Race with truncate? */ 2036 if (mapping2) { /* Race with truncate? */
2036 BUG_ON(mapping2 != mapping); 2037 BUG_ON(mapping2 != mapping);
@@ -2039,7 +2040,7 @@ int __set_page_dirty_nobuffers(struct page *page)
2039 radix_tree_tag_set(&mapping->page_tree, 2040 radix_tree_tag_set(&mapping->page_tree,
2040 page_index(page), PAGECACHE_TAG_DIRTY); 2041 page_index(page), PAGECACHE_TAG_DIRTY);
2041 } 2042 }
2042 spin_unlock_irq(&mapping->tree_lock); 2043 spin_unlock_irqrestore(&mapping->tree_lock, flags);
2043 if (mapping->host) { 2044 if (mapping->host) {
2044 /* !PageAnon && !swapper_space */ 2045 /* !PageAnon && !swapper_space */
2045 __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); 2046 __mark_inode_dirty(mapping->host, I_DIRTY_PAGES);