Lines Matching refs:sp
481 struct dlm_space *sp = NULL; in make_space() local
485 sp = kzalloc(sizeof(struct dlm_space), GFP_KERNEL); in make_space()
489 if (!sp || !gps || !nds) in make_space()
492 config_group_init_type_name(&sp->group, name, &space_type); in make_space()
495 sp->group.default_groups = gps; in make_space()
496 sp->group.default_groups[0] = &nds->ns_group; in make_space()
497 sp->group.default_groups[1] = NULL; in make_space()
499 INIT_LIST_HEAD(&sp->members); in make_space()
500 mutex_init(&sp->members_lock); in make_space()
501 sp->members_count = 0; in make_space()
502 return &sp->group; in make_space()
505 kfree(sp); in make_space()
513 struct dlm_space *sp = config_item_to_space(i); in drop_space() local
519 for (j = 0; sp->group.default_groups[j]; j++) { in drop_space()
520 tmp = &sp->group.default_groups[j]->cg_item; in drop_space()
521 sp->group.default_groups[j] = NULL; in drop_space()
530 struct dlm_space *sp = config_item_to_space(i); in release_space() local
531 kfree(sp->group.default_groups); in release_space()
532 kfree(sp); in release_space()
569 struct dlm_space *sp = config_item_to_space(g->cg_item.ci_parent); in make_node() local
581 mutex_lock(&sp->members_lock); in make_node()
582 list_add(&nd->list, &sp->members); in make_node()
583 sp->members_count++; in make_node()
584 mutex_unlock(&sp->members_lock); in make_node()
591 struct dlm_space *sp = config_item_to_space(g->cg_item.ci_parent); in drop_node() local
594 mutex_lock(&sp->members_lock); in drop_node()
596 sp->members_count--; in drop_node()
597 mutex_unlock(&sp->members_lock); in drop_node()
777 static void put_space(struct dlm_space *sp) in put_space() argument
779 config_item_put(&sp->group.cg_item); in put_space()
853 struct dlm_space *sp; in dlm_nodeid_list() local
858 sp = get_space(lsname); in dlm_nodeid_list()
859 if (!sp) in dlm_nodeid_list()
862 mutex_lock(&sp->members_lock); in dlm_nodeid_list()
863 if (!sp->members_count) { in dlm_nodeid_list()
869 ids_count = sp->members_count; in dlm_nodeid_list()
877 list_for_each_entry(nd, &sp->members, list) { in dlm_nodeid_list()
897 list_for_each_entry(nd, &sp->members, list) { in dlm_nodeid_list()
910 mutex_unlock(&sp->members_lock); in dlm_nodeid_list()
911 put_space(sp); in dlm_nodeid_list()
917 struct dlm_space *sp; in dlm_node_weight() local
921 sp = get_space(lsname); in dlm_node_weight()
922 if (!sp) in dlm_node_weight()
925 mutex_lock(&sp->members_lock); in dlm_node_weight()
926 list_for_each_entry(nd, &sp->members, list) { in dlm_node_weight()
932 mutex_unlock(&sp->members_lock); in dlm_node_weight()
933 put_space(sp); in dlm_node_weight()