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:
Al Viro
2011-07-08 21:20:11 -04:00
parent 0c1aa9a952
commit a9049376ee
15 changed files with 39 additions and 94 deletions

View File

@ -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);