File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -1755,12 +1755,19 @@ int configfs_register_group(struct config_group *parent_group,
1755
1755
1756
1756
inode_lock_nested (d_inode (parent ), I_MUTEX_PARENT );
1757
1757
ret = create_default_group (parent_group , group );
1758
- if (!ret ) {
1759
- spin_lock (& configfs_dirent_lock );
1760
- configfs_dir_set_ready (group -> cg_item .ci_dentry -> d_fsdata );
1761
- spin_unlock (& configfs_dirent_lock );
1762
- }
1758
+ if (ret )
1759
+ goto err_out ;
1760
+
1761
+ spin_lock (& configfs_dirent_lock );
1762
+ configfs_dir_set_ready (group -> cg_item .ci_dentry -> d_fsdata );
1763
+ spin_unlock (& configfs_dirent_lock );
1764
+ inode_unlock (d_inode (parent ));
1765
+ return 0 ;
1766
+ err_out :
1763
1767
inode_unlock (d_inode (parent ));
1768
+ mutex_lock (& subsys -> su_mutex );
1769
+ unlink_group (group );
1770
+ mutex_unlock (& subsys -> su_mutex );
1764
1771
return ret ;
1765
1772
}
1766
1773
EXPORT_SYMBOL (configfs_register_group );
You can’t perform that action at this time.
0 commit comments