+Index: linux-2.6.22/fs/ext3/namei.c
+===================================================================
+--- linux-2.6.22.orig/fs/ext3/namei.c 2007-11-15 13:41:18.000000000 +0100
++++ linux-2.6.22/fs/ext3/namei.c 2007-11-15 13:44:28.000000000 +0100
+@@ -1019,6 +1019,11 @@ static struct dentry *ext3_lookup(struct
+
+ if (!inode)
+ return ERR_PTR(-EACCES);
++
++ if (is_bad_inode(inode)) {
++ iput(inode);
++ return ERR_PTR(-ENOENT);
++ }
+ }
+ return d_splice_alias(inode, dentry);
+ }
+@@ -1054,6 +1059,11 @@ struct dentry *ext3_get_parent(struct de
+ if (!inode)
+ return ERR_PTR(-EACCES);
+
++ if (is_bad_inode(inode)) {
++ iput(inode);
++ return ERR_PTR(-ENOENT);
++ }
++
+ parent = d_alloc_anon(inode);
+ if (!parent) {
+ iput(inode);