提交 74f9c9c2 编写于 作者: R Roman Zippel 提交者: Linus Torvalds

[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: NRoman Zippel <zippel@linux-m68k.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 f76d28d2
......@@ -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]);
......
......@@ -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]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册