From 0c15ed5b38c6d134f323ff932a071b4bc3204f78 Mon Sep 17 00:00:00 2001 From: girish Date: Wed, 23 Jul 2008 19:06:11 +0000 Subject: [PATCH] ext3/ext4: orphan list corruption due bad inode (Patch from Q-leap) b=16360 i=adilger i=johann --- .../patches/ext3-check-bad-inode.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ldiskfs/kernel_patches/patches/ext3-check-bad-inode.patch diff --git a/ldiskfs/kernel_patches/patches/ext3-check-bad-inode.patch b/ldiskfs/kernel_patches/patches/ext3-check-bad-inode.patch new file mode 100644 index 0000000..7b0b046 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext3-check-bad-inode.patch @@ -0,0 +1,28 @@ +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); -- 1.8.3.1