diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 2066e4cb700c..75cac9ada026 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -1637,6 +1637,15 @@ out: | |||
1637 | } | 1637 | } |
1638 | EXPORT_SYMBOL(block_invalidatepage); | 1638 | EXPORT_SYMBOL(block_invalidatepage); |
1639 | 1639 | ||
1640 | int do_invalidatepage(struct page *page, unsigned long offset) | ||
1641 | { | ||
1642 | int (*invalidatepage)(struct page *, unsigned long); | ||
1643 | invalidatepage = page->mapping->a_ops->invalidatepage; | ||
1644 | if (invalidatepage == NULL) | ||
1645 | invalidatepage = block_invalidatepage; | ||
1646 | return (*invalidatepage)(page, offset); | ||
1647 | } | ||
1648 | |||
1640 | /* | 1649 | /* |
1641 | * We attach and possibly dirty the buffers atomically wrt | 1650 | * We attach and possibly dirty the buffers atomically wrt |
1642 | * __set_page_dirty_buffers() via private_lock. try_to_free_buffers | 1651 | * __set_page_dirty_buffers() via private_lock. try_to_free_buffers |
@@ -2696,7 +2705,7 @@ int block_write_full_page(struct page *page, get_block_t *get_block, | |||
2696 | * they may have been added in ext3_writepage(). Make them | 2705 | * they may have been added in ext3_writepage(). Make them |
2697 | * freeable here, so the page does not leak. | 2706 | * freeable here, so the page does not leak. |
2698 | */ | 2707 | */ |
2699 | block_invalidatepage(page, 0); | 2708 | do_invalidatepage(page, 0); |
2700 | unlock_page(page); | 2709 | unlock_page(page); |
2701 | return 0; /* don't care */ | 2710 | return 0; /* don't care */ |
2702 | } | 2711 | } |