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/dcache.c | |
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/dcache.c')
-rw-r--r-- | fs/dcache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index c61edd0318c3..41e2085d430b 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -1652,6 +1652,9 @@ struct dentry *d_splice_alias(struct inode *inode, struct dentry *dentry) | |||
1652 | { | 1652 | { |
1653 | struct dentry *new = NULL; | 1653 | struct dentry *new = NULL; |
1654 | 1654 | ||
1655 | if (IS_ERR(inode)) | ||
1656 | return ERR_CAST(inode); | ||
1657 | |||
1655 | if (inode && S_ISDIR(inode->i_mode)) { | 1658 | if (inode && S_ISDIR(inode->i_mode)) { |
1656 | spin_lock(&inode->i_lock); | 1659 | spin_lock(&inode->i_lock); |
1657 | new = __d_find_alias(inode, 1); | 1660 | new = __d_find_alias(inode, 1); |