diff options
Diffstat (limited to 'fs/kernfs/symlink.c')
-rw-r--r-- | fs/kernfs/symlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/kernfs/symlink.c b/fs/kernfs/symlink.c index af3570bb4303..004c16465594 100644 --- a/fs/kernfs/symlink.c +++ b/fs/kernfs/symlink.c | |||
@@ -30,7 +30,8 @@ struct sysfs_dirent *kernfs_create_link(struct sysfs_dirent *parent, | |||
30 | struct sysfs_addrm_cxt acxt; | 30 | struct sysfs_addrm_cxt acxt; |
31 | int error; | 31 | int error; |
32 | 32 | ||
33 | sd = sysfs_new_dirent(name, S_IFLNK|S_IRWXUGO, SYSFS_KOBJ_LINK); | 33 | sd = sysfs_new_dirent(kernfs_root(parent), name, S_IFLNK|S_IRWXUGO, |
34 | SYSFS_KOBJ_LINK); | ||
34 | if (!sd) | 35 | if (!sd) |
35 | return ERR_PTR(-ENOMEM); | 36 | return ERR_PTR(-ENOMEM); |
36 | 37 | ||