Lines Matching refs:group
627 static void detach_groups(struct config_group *group) in detach_groups() argument
629 struct dentry * dentry = dget(group->cg_item.ci_dentry); in detach_groups()
672 struct config_group *group) in create_default_group() argument
680 if (!group->cg_item.ci_name) in create_default_group()
681 group->cg_item.ci_name = group->cg_item.ci_namebuf; in create_default_group()
682 name.name = group->cg_item.ci_name; in create_default_group()
692 &group->cg_item, child); in create_default_group()
706 static int populate_groups(struct config_group *group) in populate_groups() argument
712 if (group->default_groups) { in populate_groups()
713 for (i = 0; group->default_groups[i]; i++) { in populate_groups()
714 new_group = group->default_groups[i]; in populate_groups()
716 ret = create_default_group(group, new_group); in populate_groups()
718 detach_groups(group); in populate_groups()
734 struct config_group *group; in unlink_obj() local
736 group = item->ci_group; in unlink_obj()
737 if (group) { in unlink_obj()
747 config_group_put(group); in unlink_obj()
773 static void unlink_group(struct config_group *group) in unlink_group() argument
778 if (group->default_groups) { in unlink_group()
779 for (i = 0; group->default_groups[i]; i++) { in unlink_group()
780 new_group = group->default_groups[i]; in unlink_group()
785 group->cg_subsys = NULL; in unlink_group()
786 unlink_obj(&group->cg_item); in unlink_group()
789 static void link_group(struct config_group *parent_group, struct config_group *group) in link_group() argument
795 link_obj(&parent_group->cg_item, &group->cg_item); in link_group()
800 subsys = to_configfs_subsystem(group); in link_group()
803 group->cg_subsys = subsys; in link_group()
805 if (group->default_groups) { in link_group()
806 for (i = 0; group->default_groups[i]; i++) { in link_group()
807 new_group = group->default_groups[i]; in link_group()
808 link_group(group, new_group); in link_group()
1180 struct config_group *group = NULL; in configfs_mkdir() local
1243 group = type->ct_group_ops->make_group(to_config_group(parent_item), name); in configfs_mkdir()
1244 if (!group) in configfs_mkdir()
1245 group = ERR_PTR(-ENOMEM); in configfs_mkdir()
1246 if (!IS_ERR(group)) { in configfs_mkdir()
1247 link_group(to_config_group(parent_item), group); in configfs_mkdir()
1248 item = &group->cg_item; in configfs_mkdir()
1250 ret = PTR_ERR(group); in configfs_mkdir()
1306 if (group) in configfs_mkdir()
1323 if (group) in configfs_mkdir()
1324 unlink_group(group); in configfs_mkdir()
1681 struct config_group *group = &subsys->su_group; in configfs_register_subsystem() local
1691 if (!group->cg_item.ci_name) in configfs_register_subsystem()
1692 group->cg_item.ci_name = group->cg_item.ci_namebuf; in configfs_register_subsystem()
1695 link_group(to_config_group(sd->s_element), group); in configfs_register_subsystem()
1699 name.name = group->cg_item.ci_name; in configfs_register_subsystem()
1708 err = configfs_attach_group(sd->s_element, &group->cg_item, in configfs_register_subsystem()
1724 unlink_group(group); in configfs_register_subsystem()
1733 struct config_group *group = &subsys->su_group; in configfs_unregister_subsystem() local
1734 struct dentry *dentry = group->cg_item.ci_dentry; in configfs_unregister_subsystem()
1752 configfs_detach_group(&group->cg_item); in configfs_unregister_subsystem()
1763 unlink_group(group); in configfs_unregister_subsystem()