ext3/ext4: orphan list corruption due bad inode
[deliverable/linux.git] / fs / ext3 / namei.c
index 9bb046df827a7a7a4d694dad36d727a71237a652..1586807b81779ef9c02008e6828c9df50d4f000c 100644 (file)
@@ -1019,6 +1019,11 @@ static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, str
 
                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 dentry *child)
        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);
This page took 0.02467 seconds and 5 git commands to generate.