linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/5] hfs: don't reference missing page
@ 2005-08-01  9:43 Roman Zippel
  0 siblings, 0 replies; only message in thread
From: Roman Zippel @ 2005-08-01  9:43 UTC (permalink / raw)
  To: Andrew Morton, linux-fsdevel

Hi,

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

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>

---

 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]);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-01  9:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-01  9:43 [PATCH 2/5] hfs: don't reference missing page Roman Zippel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).