Skip to content

Commit

Permalink
[PATCH] hfs: don't reference missing page
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roman Zippel authored and Linus Torvalds committed Aug 2, 2005
1 parent f76d28d commit 74f9c9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/hfs/bnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ void hfs_bnode_put(struct hfs_bnode *node)
return;
}
for (i = 0; i < tree->pages_per_bnode; i++) {
if (!node->page[i])
continue;
mark_page_accessed(node->page[i]);
#if REF_PAGES
put_page(node->page[i]);
Expand Down
2 changes: 2 additions & 0 deletions fs/hfsplus/bnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ void hfs_bnode_put(struct hfs_bnode *node)
return;
}
for (i = 0; i < tree->pages_per_bnode; i++) {
if (!node->page[i])
continue;
mark_page_accessed(node->page[i]);
#if REF_PAGES
put_page(node->page[i]);
Expand Down

0 comments on commit 74f9c9c

Please sign in to comment.