diff options
-rw-r--r-- | fs/sysfs/symlink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index 2f86e0422290..d056e9695cd6 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c | |||
@@ -86,7 +86,9 @@ int sysfs_create_link(struct kobject * kobj, struct kobject * target, const char | |||
86 | sd = sysfs_new_dirent(name, S_IFLNK|S_IRWXUGO, SYSFS_KOBJ_LINK); | 86 | sd = sysfs_new_dirent(name, S_IFLNK|S_IRWXUGO, SYSFS_KOBJ_LINK); |
87 | if (!sd) | 87 | if (!sd) |
88 | goto out_put; | 88 | goto out_put; |
89 | |||
89 | sd->s_elem.symlink.target_sd = target_sd; | 90 | sd->s_elem.symlink.target_sd = target_sd; |
91 | target_sd = NULL; /* reference is now owned by the symlink */ | ||
90 | 92 | ||
91 | sysfs_addrm_start(&acxt, parent_sd); | 93 | sysfs_addrm_start(&acxt, parent_sd); |
92 | 94 | ||