Skip to content
Snippets Groups Projects
Commit 27b8f3fe authored by girish's avatar girish
Browse files

ext3/ext4: orphan list corruption due bad inode (Patch from Q-leap)

b=16360
i=adilger
i=johann
parent c3b83efd
No related branches found
No related tags found
No related merge requests found
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);
......@@ -26,3 +26,4 @@ ext3-external-journal-2.6.9.patch
ext3-max-dir-size.patch
ext3-print-inum-in-htree-warning.patch
ext3-xattr-no-update-ctime-rhel4.patch
ext3-check-bad-inode.patch
......@@ -23,3 +23,4 @@ ext3-max-dir-size.patch
ext3-print-inum-in-htree-warning.patch
ext3-block-bitmap-validation-2.6-rhel5.patch
ext3-xattr-no-update-ctime-2.6.22-vanilla.patch
ext3-check-bad-inode.patch
......@@ -27,3 +27,4 @@ ext3-max-dir-size.patch
ext3-print-inum-in-htree-warning.patch
ext3-block-bitmap-validation-2.6-sles10.patch
ext3-xattr-no-update-ctime-2.6-sles10.patch
ext3-check-bad-inode.patch
......@@ -25,3 +25,4 @@ ext3-external-journal-2.6.5.patch
ext3-max-dir-size-2.6.5-suse.patch
ext3-print-inum-in-htree-warning.patch
ext3-xattr-no-update-ctime-suse.patch
ext3-check-bad-inode.patch
......@@ -22,3 +22,4 @@ ext3-lookup-dotdot-2.6.9.patch
ext3-max-dir-size.patch
ext3-print-inum-in-htree-warning.patch
ext3-xattr-no-update-ctime-2.6.22-vanilla.patch
ext3-check-bad-inode.patch
......@@ -23,3 +23,4 @@ ext3-export-journal-api.patch
ext3-max-dir-size.patch
ext3-print-inum-in-htree-warning.patch
ext3-xattr-no-update-ctime-2.6.22-vanilla.patch
ext3-check-bad-inode.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment