diff options
| -rw-r--r-- | fs/buffer.c | 3 | ||||
| -rw-r--r-- | fs/xfs/xfs_aops.c | 15 | ||||
| -rw-r--r-- | include/linux/mm.h | 1 |
3 files changed, 5 insertions, 14 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index ec5dd39071e6..64b1e2065b6b 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
| @@ -594,7 +594,7 @@ EXPORT_SYMBOL(mark_buffer_dirty_inode); | |||
| 594 | * | 594 | * |
| 595 | * The caller must hold lock_page_memcg(). | 595 | * The caller must hold lock_page_memcg(). |
| 596 | */ | 596 | */ |
| 597 | static void __set_page_dirty(struct page *page, struct address_space *mapping, | 597 | void __set_page_dirty(struct page *page, struct address_space *mapping, |
| 598 | int warn) | 598 | int warn) |
| 599 | { | 599 | { |
| 600 | unsigned long flags; | 600 | unsigned long flags; |
| @@ -608,6 +608,7 @@ static void __set_page_dirty(struct page *page, struct address_space *mapping, | |||
| 608 | } | 608 | } |
| 609 | spin_unlock_irqrestore(&mapping->tree_lock, flags); | 609 | spin_unlock_irqrestore(&mapping->tree_lock, flags); |
| 610 | } | 610 | } |
| 611 | EXPORT_SYMBOL_GPL(__set_page_dirty); | ||
| 611 | 612 | ||
| 612 | /* | 613 | /* |
| 613 | * Add a page to the dirty page list. | 614 | * Add a page to the dirty page list. |
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 436a1de3fcdf..0ab824f574ed 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c | |||
| @@ -1467,19 +1467,8 @@ xfs_vm_set_page_dirty( | |||
| 1467 | newly_dirty = !TestSetPageDirty(page); | 1467 | newly_dirty = !TestSetPageDirty(page); |
| 1468 | spin_unlock(&mapping->private_lock); | 1468 | spin_unlock(&mapping->private_lock); |
| 1469 | 1469 | ||
| 1470 | if (newly_dirty) { | 1470 | if (newly_dirty) |
| 1471 | /* sigh - __set_page_dirty() is static, so copy it here, too */ | 1471 | __set_page_dirty(page, mapping, 1); |
| 1472 | unsigned long flags; | ||
| 1473 | |||
| 1474 | spin_lock_irqsave(&mapping->tree_lock, flags); | ||
| 1475 | if (page->mapping) { /* Race with truncate? */ | ||
| 1476 | WARN_ON_ONCE(!PageUptodate(page)); | ||
| 1477 | account_page_dirtied(page, mapping); | ||
| 1478 | radix_tree_tag_set(&mapping->page_tree, | ||
| 1479 | page_index(page), PAGECACHE_TAG_DIRTY); | ||
| 1480 | } | ||
| 1481 | spin_unlock_irqrestore(&mapping->tree_lock, flags); | ||
| 1482 | } | ||
| 1483 | unlock_page_memcg(page); | 1472 | unlock_page_memcg(page); |
| 1484 | if (newly_dirty) | 1473 | if (newly_dirty) |
| 1485 | __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); | 1474 | __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 342c441c25d0..f13bc25f7a9f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -1466,6 +1466,7 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | |||
| 1466 | extern void do_invalidatepage(struct page *page, unsigned int offset, | 1466 | extern void do_invalidatepage(struct page *page, unsigned int offset, |
| 1467 | unsigned int length); | 1467 | unsigned int length); |
| 1468 | 1468 | ||
| 1469 | void __set_page_dirty(struct page *, struct address_space *, int warn); | ||
| 1469 | int __set_page_dirty_nobuffers(struct page *page); | 1470 | int __set_page_dirty_nobuffers(struct page *page); |
| 1470 | int __set_page_dirty_no_writeback(struct page *page); | 1471 | int __set_page_dirty_no_writeback(struct page *page); |
| 1471 | int redirty_page_for_writepage(struct writeback_control *wbc, | 1472 | int redirty_page_for_writepage(struct writeback_control *wbc, |
