Lines Matching refs:group

616 static void detach_groups(struct config_group *group)  in detach_groups()  argument
618 struct dentry * dentry = dget(group->cg_item.ci_dentry); in detach_groups()
661 struct config_group *group, in create_default_group() argument
669 if (!group->cg_item.ci_name) in create_default_group()
670 group->cg_item.ci_name = group->cg_item.ci_namebuf; in create_default_group()
673 child = d_alloc_name(parent, group->cg_item.ci_name); in create_default_group()
678 &group->cg_item, child, frag); in create_default_group()
692 static int populate_groups(struct config_group *group, in populate_groups() argument
698 list_for_each_entry(new_group, &group->default_groups, group_entry) { in populate_groups()
699 ret = create_default_group(group, new_group, frag); in populate_groups()
701 detach_groups(group); in populate_groups()
709 void configfs_remove_default_groups(struct config_group *group) in configfs_remove_default_groups() argument
713 list_for_each_entry_safe(g, n, &group->default_groups, group_entry) { in configfs_remove_default_groups()
727 struct config_group *group; in unlink_obj() local
729 group = item->ci_group; in unlink_obj()
730 if (group) { in unlink_obj()
740 config_group_put(group); in unlink_obj()
766 static void unlink_group(struct config_group *group) in unlink_group() argument
770 list_for_each_entry(new_group, &group->default_groups, group_entry) in unlink_group()
773 group->cg_subsys = NULL; in unlink_group()
774 unlink_obj(&group->cg_item); in unlink_group()
777 static void link_group(struct config_group *parent_group, struct config_group *group) in link_group() argument
782 link_obj(&parent_group->cg_item, &group->cg_item); in link_group()
787 subsys = to_configfs_subsystem(group); in link_group()
790 group->cg_subsys = subsys; in link_group()
792 list_for_each_entry(new_group, &group->default_groups, group_entry) in link_group()
793 link_group(group, new_group); in link_group()
1259 struct config_group *group = NULL; in configfs_mkdir() local
1329 group = type->ct_group_ops->make_group(to_config_group(parent_item), name); in configfs_mkdir()
1330 if (!group) in configfs_mkdir()
1331 group = ERR_PTR(-ENOMEM); in configfs_mkdir()
1332 if (!IS_ERR(group)) { in configfs_mkdir()
1333 link_group(to_config_group(parent_item), group); in configfs_mkdir()
1334 item = &group->cg_item; in configfs_mkdir()
1336 ret = PTR_ERR(group); in configfs_mkdir()
1392 if (group) in configfs_mkdir()
1409 if (group) in configfs_mkdir()
1410 unlink_group(group); in configfs_mkdir()
1724 struct config_group *group) in configfs_register_group() argument
1736 link_group(parent_group, group); in configfs_register_group()
1742 ret = create_default_group(parent_group, group, frag); in configfs_register_group()
1747 configfs_dir_set_ready(group->cg_item.ci_dentry->d_fsdata); in configfs_register_group()
1755 unlink_group(group); in configfs_register_group()
1768 void configfs_unregister_group(struct config_group *group) in configfs_unregister_group() argument
1770 struct configfs_subsystem *subsys = group->cg_subsys; in configfs_unregister_group()
1771 struct dentry *dentry = group->cg_item.ci_dentry; in configfs_unregister_group()
1772 struct dentry *parent = group->cg_item.ci_parent->ci_dentry; in configfs_unregister_group()
1785 configfs_detach_group(&group->cg_item); in configfs_unregister_group()
1795 unlink_group(group); in configfs_unregister_group()
1817 struct config_group *group; in configfs_register_default_group() local
1819 group = kzalloc(sizeof(*group), GFP_KERNEL); in configfs_register_default_group()
1820 if (!group) in configfs_register_default_group()
1822 config_group_init_type_name(group, name, item_type); in configfs_register_default_group()
1824 ret = configfs_register_group(parent_group, group); in configfs_register_default_group()
1826 kfree(group); in configfs_register_default_group()
1829 return group; in configfs_register_default_group()
1837 void configfs_unregister_default_group(struct config_group *group) in configfs_unregister_default_group() argument
1839 configfs_unregister_group(group); in configfs_unregister_default_group()
1840 kfree(group); in configfs_unregister_default_group()
1847 struct config_group *group = &subsys->su_group; in configfs_register_subsystem() local
1863 if (!group->cg_item.ci_name) in configfs_register_subsystem()
1864 group->cg_item.ci_name = group->cg_item.ci_namebuf; in configfs_register_subsystem()
1868 link_group(to_config_group(sd->s_element), group); in configfs_register_subsystem()
1874 dentry = d_alloc_name(root, group->cg_item.ci_name); in configfs_register_subsystem()
1878 err = configfs_attach_group(sd->s_element, &group->cg_item, in configfs_register_subsystem()
1895 unlink_group(group); in configfs_register_subsystem()
1906 struct config_group *group = &subsys->su_group; in configfs_unregister_subsystem() local
1907 struct dentry *dentry = group->cg_item.ci_dentry; in configfs_unregister_subsystem()
1931 configfs_detach_group(&group->cg_item); in configfs_unregister_subsystem()
1944 unlink_group(group); in configfs_unregister_subsystem()