aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
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/ext4
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/ext4')
-rw-r--r--fs/ext4/namei.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index b754b7721f51..707d605bf769 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1037,15 +1037,11 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, stru
1037 return ERR_PTR(-EIO); 1037 return ERR_PTR(-EIO);
1038 } 1038 }
1039 inode = ext4_iget(dir->i_sb, ino); 1039 inode = ext4_iget(dir->i_sb, ino);
1040 if (IS_ERR(inode)) { 1040 if (inode == ERR_PTR(-ESTALE)) {
1041 if (PTR_ERR(inode) == -ESTALE) { 1041 EXT4_ERROR_INODE(dir,
1042 EXT4_ERROR_INODE(dir, 1042 "deleted inode referenced: %u",
1043 "deleted inode referenced: %u", 1043 ino);
1044 ino); 1044 return ERR_PTR(-EIO);
1045 return ERR_PTR(-EIO);
1046 } else {
1047 return ERR_CAST(inode);
1048 }
1049 } 1045 }
1050 } 1046 }
1051 return d_splice_alias(inode, dentry); 1047 return d_splice_alias(inode, dentry);