|
@@ -1019,6 +1019,11 @@ static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, str
|
|
|
|
|
|
if (!inode)
|
|
if (!inode)
|
|
return ERR_PTR(-EACCES);
|
|
return ERR_PTR(-EACCES);
|
|
|
|
+
|
|
|
|
+ if (is_bad_inode(inode)) {
|
|
|
|
+ iput(inode);
|
|
|
|
+ return ERR_PTR(-ENOENT);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return d_splice_alias(inode, dentry);
|
|
return d_splice_alias(inode, dentry);
|
|
}
|
|
}
|
|
@@ -1054,6 +1059,11 @@ struct dentry *ext3_get_parent(struct dentry *child)
|
|
if (!inode)
|
|
if (!inode)
|
|
return ERR_PTR(-EACCES);
|
|
return ERR_PTR(-EACCES);
|
|
|
|
|
|
|
|
+ if (is_bad_inode(inode)) {
|
|
|
|
+ iput(inode);
|
|
|
|
+ return ERR_PTR(-ENOENT);
|
|
|
|
+ }
|
|
|
|
+
|
|
parent = d_alloc_anon(inode);
|
|
parent = d_alloc_anon(inode);
|
|
if (!parent) {
|
|
if (!parent) {
|
|
iput(inode);
|
|
iput(inode);
|