aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 16cfbcd254f1..eeb8ac1aa856 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -701,7 +701,10 @@ EXPORT_SYMBOL(mark_buffer_dirty_inode);
701 */ 701 */
702int __set_page_dirty_buffers(struct page *page) 702int __set_page_dirty_buffers(struct page *page)
703{ 703{
704 struct address_space * const mapping = page->mapping; 704 struct address_space * const mapping = page_mapping(page);
705
706 if (unlikely(!mapping))
707 return !TestSetPageDirty(page);
705 708
706 spin_lock(&mapping->private_lock); 709 spin_lock(&mapping->private_lock);
707 if (page_has_buffers(page)) { 710 if (page_has_buffers(page)) {