From 74f9c9c258249fba3e2e78f70691528426a6c010 Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Mon, 1 Aug 2005 21:11:41 -0700 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/hfsplus/bnode.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/hfsplus/bnode.c') diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index 267872e84d7..8868d3b766f 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c @@ -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]); -- cgit v1.2.3-70-g09d2