summaryrefslogtreecommitdiff
path: root/fs/dcache.c
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/dcache.c
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/dcache.c')
-rw-r--r--fs/dcache.c3
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)
{
struct dentry *new = NULL;
+ if (IS_ERR(inode))
+ return ERR_CAST(inode);
+
if (inode && S_ISDIR(inode->i_mode)) {
spin_lock(&inode->i_lock);
new = __d_find_alias(inode, 1);