summaryrefslogtreecommitdiffstats
path: root/fs/kernfs/symlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/kernfs/symlink.c')
-rw-r--r--fs/kernfs/symlink.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/kernfs/symlink.c b/fs/kernfs/symlink.c
index a03e26036ef9..4d457055acb9 100644
--- a/fs/kernfs/symlink.c
+++ b/fs/kernfs/symlink.c
@@ -30,8 +30,7 @@ struct kernfs_node *kernfs_create_link(struct kernfs_node *parent,
struct kernfs_addrm_cxt acxt;
int error;
- kn = kernfs_new_node(kernfs_root(parent), name, S_IFLNK|S_IRWXUGO,
- KERNFS_LINK);
+ kn = kernfs_new_node(parent, name, S_IFLNK|S_IRWXUGO, KERNFS_LINK);
if (!kn)
return ERR_PTR(-ENOMEM);
@@ -41,7 +40,7 @@ struct kernfs_node *kernfs_create_link(struct kernfs_node *parent,
kernfs_get(target); /* ref owned by symlink */
kernfs_addrm_start(&acxt);
- error = kernfs_add_one(&acxt, kn, parent);
+ error = kernfs_add_one(&acxt, kn);
kernfs_addrm_finish(&acxt);
if (!error)