diff options
author | NeilBrown <neilb@suse.de> | 2006-03-26 04:37:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:56:55 -0500 |
commit | 2ff28e22bdb8727fbc7d7889807bc5a73aae56c5 (patch) | |
tree | f7418aa963d729bf9fe8bd44d6c9b6e424a6c6bf /fs/buffer.c | |
parent | 3978d7179d3849848df8a37dd0a5acc20bcb8750 (diff) |
[PATCH] Make address_space_operations->invalidatepage return void
The return value of this function is never used, so let's be honest and
declare it as void.
Some places where invalidatepage returned 0, I have inserted comments
suggesting a BUG_ON.
[akpm@osdl.org: JBD BUG fix]
[akpm@osdl.org: rework for git-nfs]
[akpm@osdl.org: don't go BUG in block_invalidate_page()]
Signed-off-by: Neil Brown <neilb@suse.de>
Acked-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 18 |
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 | */ |
1596 | int block_invalidatepage(struct page *page, unsigned long offset) | 1596 | void 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); |
1628 | out: | 1627 | out: |
1629 | return ret; | 1628 | return; |
1630 | } | 1629 | } |
1631 | EXPORT_SYMBOL(block_invalidatepage); | 1630 | EXPORT_SYMBOL(block_invalidatepage); |
1632 | 1631 | ||
1633 | int do_invalidatepage(struct page *page, unsigned long offset) | 1632 | void 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 | /* |