summaryrefslogtreecommitdiff
path: root/fs/ext2
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-07-08 21:20:11 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-07-20 01:44:26 -0400
commita9049376ee05bf966bfe2b081b5071326856890a (patch)
treeefb3cbfc7760537f201bb28dacbb0d39ec39f04c /fs/ext2
parent0c1aa9a952c3608eb17bf990466f1491d1ee8b6c (diff)
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>
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/namei.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
index ed5c5d496ee..d60b7099e2d 100644
--- a/fs/ext2/namei.c
+++ b/fs/ext2/namei.c
@@ -67,15 +67,11 @@ static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, str
inode = NULL;
if (ino) {
inode = ext2_iget(dir->i_sb, ino);
- if (IS_ERR(inode)) {
- if (PTR_ERR(inode) == -ESTALE) {
- ext2_error(dir->i_sb, __func__,
- "deleted inode referenced: %lu",
- (unsigned long) ino);
- return ERR_PTR(-EIO);
- } else {
- return ERR_CAST(inode);
- }
+ if (inode == ERR_PTR(-ESTALE)) {
+ ext2_error(dir->i_sb, __func__,
+ "deleted inode referenced: %lu",
+ (unsigned long) ino);
+ return ERR_PTR(-EIO);
}
}
return d_splice_alias(inode, dentry);