Hi,

If there was a read error, the bnode might miss some pages, so skip them.

Signed-off-by: Roman Zippel <[EMAIL PROTECTED]>

---

 fs/hfs/bnode.c     |    2 ++
 fs/hfsplus/bnode.c |    2 ++
 2 files changed, 4 insertions(+)

Index: linux-2.6/fs/hfsplus/bnode.c
===================================================================
--- linux-2.6.orig/fs/hfsplus/bnode.c   2005-07-31 19:22:29.000000000 +0200
+++ linux-2.6/fs/hfsplus/bnode.c        2005-07-31 19:25:13.000000000 +0200
@@ -643,6 +643,8 @@ void hfs_bnode_put(struct hfs_bnode *nod
                        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]);
Index: linux-2.6/fs/hfs/bnode.c
===================================================================
--- linux-2.6.orig/fs/hfs/bnode.c       2005-07-31 19:22:27.000000000 +0200
+++ linux-2.6/fs/hfs/bnode.c    2005-07-31 19:25:13.000000000 +0200
@@ -480,6 +480,8 @@ void hfs_bnode_put(struct hfs_bnode *nod
                        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]);
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to