summaryrefslogtreecommitdiffstats
path: root/fs/proc/generic.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-05-03 15:45:06 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2018-05-26 20:20:50 +0200
commit888e2b03ef56694290e58bd9ac23f8033bf6369f (patch)
tree71b2bfef0e1a8c09b47ceac8d1f94411499e5c94 /fs/proc/generic.c
parentprocfs: switch instantiate_t to d_splice_alias() (diff)
downloadlinux-888e2b03ef56694290e58bd9ac23f8033bf6369f.tar.xz
linux-888e2b03ef56694290e58bd9ac23f8033bf6369f.zip
switch the rest of procfs lookups to d_splice_alias()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/generic.c')
-rw-r--r--fs/proc/generic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 2078e70e1595..b77034a694ef 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -256,8 +256,7 @@ struct dentry *proc_lookup_de(struct inode *dir, struct dentry *dentry,
if (!inode)
return ERR_PTR(-ENOMEM);
d_set_d_op(dentry, &proc_misc_dentry_ops);
- d_add(dentry, inode);
- return NULL;
+ return d_splice_alias(inode, dentry);
}
read_unlock(&proc_subdir_lock);
return ERR_PTR(-ENOENT);