Lines Matching refs:group
615 static void detach_groups(struct config_group *group) in detach_groups() argument
617 struct dentry * dentry = dget(group->cg_item.ci_dentry); in detach_groups()
660 struct config_group *group) in create_default_group() argument
668 if (!group->cg_item.ci_name) in create_default_group()
669 group->cg_item.ci_name = group->cg_item.ci_namebuf; in create_default_group()
670 name.name = group->cg_item.ci_name; in create_default_group()
680 &group->cg_item, child); in create_default_group()
694 static int populate_groups(struct config_group *group) in populate_groups() argument
700 if (group->default_groups) { in populate_groups()
701 for (i = 0; group->default_groups[i]; i++) { in populate_groups()
702 new_group = group->default_groups[i]; in populate_groups()
704 ret = create_default_group(group, new_group); in populate_groups()
706 detach_groups(group); in populate_groups()
722 struct config_group *group; in unlink_obj() local
724 group = item->ci_group; in unlink_obj()
725 if (group) { in unlink_obj()
735 config_group_put(group); in unlink_obj()
761 static void unlink_group(struct config_group *group) in unlink_group() argument
766 if (group->default_groups) { in unlink_group()
767 for (i = 0; group->default_groups[i]; i++) { in unlink_group()
768 new_group = group->default_groups[i]; 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
783 link_obj(&parent_group->cg_item, &group->cg_item); in link_group()
788 subsys = to_configfs_subsystem(group); in link_group()
791 group->cg_subsys = subsys; in link_group()
793 if (group->default_groups) { in link_group()
794 for (i = 0; group->default_groups[i]; i++) { in link_group()
795 new_group = group->default_groups[i]; in link_group()
796 link_group(group, new_group); in link_group()
1169 struct config_group *group = NULL; in configfs_mkdir() local
1232 group = type->ct_group_ops->make_group(to_config_group(parent_item), name); in configfs_mkdir()
1233 if (!group) in configfs_mkdir()
1234 group = ERR_PTR(-ENOMEM); in configfs_mkdir()
1235 if (!IS_ERR(group)) { in configfs_mkdir()
1236 link_group(to_config_group(parent_item), group); in configfs_mkdir()
1237 item = &group->cg_item; in configfs_mkdir()
1239 ret = PTR_ERR(group); in configfs_mkdir()
1295 if (group) in configfs_mkdir()
1312 if (group) in configfs_mkdir()
1313 unlink_group(group); in configfs_mkdir()
1670 struct config_group *group = &subsys->su_group; in configfs_register_subsystem() local
1680 if (!group->cg_item.ci_name) in configfs_register_subsystem()
1681 group->cg_item.ci_name = group->cg_item.ci_namebuf; in configfs_register_subsystem()
1684 link_group(to_config_group(sd->s_element), group); in configfs_register_subsystem()
1688 name.name = group->cg_item.ci_name; in configfs_register_subsystem()
1697 err = configfs_attach_group(sd->s_element, &group->cg_item, in configfs_register_subsystem()
1713 unlink_group(group); in configfs_register_subsystem()
1722 struct config_group *group = &subsys->su_group; in configfs_unregister_subsystem() local
1723 struct dentry *dentry = group->cg_item.ci_dentry; in configfs_unregister_subsystem()
1741 configfs_detach_group(&group->cg_item); in configfs_unregister_subsystem()
1752 unlink_group(group); in configfs_unregister_subsystem()