diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-08 21:20:11 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 01:44:26 -0400 |
commit | a9049376ee05bf966bfe2b081b5071326856890a (patch) | |
tree | efb3cbfc7760537f201bb28dacbb0d39ec39f04c /fs/nilfs2 | |
parent | 0c1aa9a952c3608eb17bf990466f1491d1ee8b6c (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/nilfs2')
-rw-r--r-- | fs/nilfs2/namei.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c index 546849b3e88f..a3141990061e 100644 --- a/fs/nilfs2/namei.c +++ b/fs/nilfs2/namei.c | |||
@@ -72,12 +72,7 @@ nilfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) | |||
72 | return ERR_PTR(-ENAMETOOLONG); | 72 | return ERR_PTR(-ENAMETOOLONG); |
73 | 73 | ||
74 | ino = nilfs_inode_by_name(dir, &dentry->d_name); | 74 | ino = nilfs_inode_by_name(dir, &dentry->d_name); |
75 | inode = NULL; | 75 | inode = ino ? nilfs_iget(dir->i_sb, NILFS_I(dir)->i_root, ino) : NULL; |
76 | if (ino) { | ||
77 | inode = nilfs_iget(dir->i_sb, NILFS_I(dir)->i_root, ino); | ||
78 | if (IS_ERR(inode)) | ||
79 | return ERR_CAST(inode); | ||
80 | } | ||
81 | return d_splice_alias(inode, dentry); | 76 | return d_splice_alias(inode, dentry); |
82 | } | 77 | } |
83 | 78 | ||