aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 0b9456fd074f..f25f58096428 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1593,11 +1593,10 @@ EXPORT_SYMBOL(try_to_release_page);
1593 * point. Because the caller is about to free (and possibly reuse) those 1593 * point. Because the caller is about to free (and possibly reuse) those
1594 * blocks on-disk. 1594 * blocks on-disk.
1595 */ 1595 */
1596int block_invalidatepage(struct page *page, unsigned long offset) 1596void block_invalidatepage(struct page *page, unsigned long offset)
1597{ 1597{
1598 struct buffer_head *head, *bh, *next; 1598 struct buffer_head *head, *bh, *next;
1599 unsigned int curr_off = 0; 1599 unsigned int curr_off = 0;
1600 int ret = 1;
1601 1600
1602 BUG_ON(!PageLocked(page)); 1601 BUG_ON(!PageLocked(page));
1603 if (!page_has_buffers(page)) 1602 if (!page_has_buffers(page))
@@ -1624,19 +1623,18 @@ int block_invalidatepage(struct page *page, unsigned long offset)
1624 * so real IO is not possible anymore. 1623 * so real IO is not possible anymore.
1625 */ 1624 */
1626 if (offset == 0) 1625 if (offset == 0)
1627 ret = try_to_release_page(page, 0); 1626 try_to_release_page(page, 0);
1628out: 1627out:
1629 return ret; 1628 return;
1630} 1629}
1631EXPORT_SYMBOL(block_invalidatepage); 1630EXPORT_SYMBOL(block_invalidatepage);
1632 1631
1633int do_invalidatepage(struct page *page, unsigned long offset) 1632void do_invalidatepage(struct page *page, unsigned long offset)
1634{ 1633{
1635 int (*invalidatepage)(struct page *, unsigned long); 1634 void (*invalidatepage)(struct page *, unsigned long);
1636 invalidatepage = page->mapping->a_ops->invalidatepage; 1635 invalidatepage = page->mapping->a_ops->invalidatepage ? :
1637 if (invalidatepage == NULL) 1636 block_invalidatepage;
1638 invalidatepage = block_invalidatepage; 1637 (*invalidatepage)(page, offset);
1639 return (*invalidatepage)(page, offset);
1640} 1638}
1641 1639
1642/* 1640/*