diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2005-08-02 00:11:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-02 00:38:00 -0400 |
commit | 74f9c9c258249fba3e2e78f70691528426a6c010 (patch) | |
tree | 1a334bf40020b2db5ed07a218a7830a427f74b93 /fs/hfs | |
parent | f76d28d235cf777dd2e1c1d48c16ee10c1d1587f (diff) |
[PATCH] hfs: don't reference missing page
If there was a read error, the bnode might miss some pages, so skip them.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/hfs')
-rw-r--r-- | fs/hfs/bnode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c index 6ad1211f84ed..a096c5a56664 100644 --- a/fs/hfs/bnode.c +++ b/fs/hfs/bnode.c | |||
@@ -480,6 +480,8 @@ void hfs_bnode_put(struct hfs_bnode *node) | |||
480 | return; | 480 | return; |
481 | } | 481 | } |
482 | for (i = 0; i < tree->pages_per_bnode; i++) { | 482 | for (i = 0; i < tree->pages_per_bnode; i++) { |
483 | if (!node->page[i]) | ||
484 | continue; | ||
483 | mark_page_accessed(node->page[i]); | 485 | mark_page_accessed(node->page[i]); |
484 | #if REF_PAGES | 486 | #if REF_PAGES |
485 | put_page(node->page[i]); | 487 | put_page(node->page[i]); |