make d_splice_alias(ERR_PTR(err), dentry) = ERR_PTR(err)
... and simplify the living hell out of callers Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@ -1038,15 +1038,11 @@ static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, str
|
||||
return ERR_PTR(-EIO);
|
||||
}
|
||||
inode = ext3_iget(dir->i_sb, ino);
|
||||
if (IS_ERR(inode)) {
|
||||
if (PTR_ERR(inode) == -ESTALE) {
|
||||
ext3_error(dir->i_sb, __func__,
|
||||
"deleted inode referenced: %lu",
|
||||
ino);
|
||||
return ERR_PTR(-EIO);
|
||||
} else {
|
||||
return ERR_CAST(inode);
|
||||
}
|
||||
if (inode == ERR_PTR(-ESTALE)) {
|
||||
ext3_error(dir->i_sb, __func__,
|
||||
"deleted inode referenced: %lu",
|
||||
ino);
|
||||
return ERR_PTR(-EIO);
|
||||
}
|
||||
}
|
||||
return d_splice_alias(inode, dentry);
|
||||
|
Reference in New Issue
Block a user