diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 651dba10b9c2..27265a8b43c1 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -654,14 +654,16 @@ EXPORT_SYMBOL(mark_buffer_dirty_inode); | |||
654 | static void __set_page_dirty(struct page *page, | 654 | static void __set_page_dirty(struct page *page, |
655 | struct address_space *mapping, int warn) | 655 | struct address_space *mapping, int warn) |
656 | { | 656 | { |
657 | spin_lock_irq(&mapping->tree_lock); | 657 | unsigned long flags; |
658 | |||
659 | spin_lock_irqsave(&mapping->tree_lock, flags); | ||
658 | if (page->mapping) { /* Race with truncate? */ | 660 | if (page->mapping) { /* Race with truncate? */ |
659 | WARN_ON_ONCE(warn && !PageUptodate(page)); | 661 | WARN_ON_ONCE(warn && !PageUptodate(page)); |
660 | account_page_dirtied(page, mapping); | 662 | account_page_dirtied(page, mapping); |
661 | radix_tree_tag_set(&mapping->page_tree, | 663 | radix_tree_tag_set(&mapping->page_tree, |
662 | page_index(page), PAGECACHE_TAG_DIRTY); | 664 | page_index(page), PAGECACHE_TAG_DIRTY); |
663 | } | 665 | } |
664 | spin_unlock_irq(&mapping->tree_lock); | 666 | spin_unlock_irqrestore(&mapping->tree_lock, flags); |
665 | __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); | 667 | __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); |
666 | } | 668 | } |
667 | 669 | ||