|
@@ -83,14 +83,13 @@ static int create_link(struct config_item *parent_item,
|
|
ret = -ENOMEM;
|
|
ret = -ENOMEM;
|
|
sl = kmalloc(sizeof(struct configfs_symlink), GFP_KERNEL);
|
|
sl = kmalloc(sizeof(struct configfs_symlink), GFP_KERNEL);
|
|
if (sl) {
|
|
if (sl) {
|
|
- sl->sl_target = config_item_get(item);
|
|
|
|
spin_lock(&configfs_dirent_lock);
|
|
spin_lock(&configfs_dirent_lock);
|
|
if (target_sd->s_type & CONFIGFS_USET_DROPPING) {
|
|
if (target_sd->s_type & CONFIGFS_USET_DROPPING) {
|
|
spin_unlock(&configfs_dirent_lock);
|
|
spin_unlock(&configfs_dirent_lock);
|
|
- config_item_put(item);
|
|
|
|
kfree(sl);
|
|
kfree(sl);
|
|
return -ENOENT;
|
|
return -ENOENT;
|
|
}
|
|
}
|
|
|
|
+ sl->sl_target = config_item_get(item);
|
|
list_add(&sl->sl_list, &target_sd->s_links);
|
|
list_add(&sl->sl_list, &target_sd->s_links);
|
|
spin_unlock(&configfs_dirent_lock);
|
|
spin_unlock(&configfs_dirent_lock);
|
|
ret = configfs_create_link(sl, parent_item->ci_dentry,
|
|
ret = configfs_create_link(sl, parent_item->ci_dentry,
|