Lines Matching full:cn
149 struct crush_name_node *cn; in alloc_crush_name() local
151 cn = kmalloc(sizeof(*cn) + name_len + 1, GFP_NOIO); in alloc_crush_name()
152 if (!cn) in alloc_crush_name()
155 RB_CLEAR_NODE(&cn->cn_node); in alloc_crush_name()
156 return cn; in alloc_crush_name()
159 static void free_crush_name(struct crush_name_node *cn) in free_crush_name() argument
161 WARN_ON(!RB_EMPTY_NODE(&cn->cn_node)); in free_crush_name()
163 kfree(cn); in free_crush_name()
174 struct crush_name_node *cn; in DEFINE_RB_FUNCS() local
182 cn = alloc_crush_name(name_len); in DEFINE_RB_FUNCS()
183 if (!cn) in DEFINE_RB_FUNCS()
186 cn->cn_id = id; in DEFINE_RB_FUNCS()
187 memcpy(cn->cn_name, *p, name_len); in DEFINE_RB_FUNCS()
188 cn->cn_name[name_len] = '\0'; in DEFINE_RB_FUNCS()
191 if (!__insert_crush_name(root, cn)) { in DEFINE_RB_FUNCS()
192 free_crush_name(cn); in DEFINE_RB_FUNCS()
206 struct crush_name_node *cn = in clear_crush_names() local
209 erase_crush_name(root, cn); in clear_crush_names()
210 free_crush_name(cn); in clear_crush_names()
3002 struct crush_name_node *type_cn, *cn; in get_immediate_parent() local
3011 cn = lookup_crush_name(&c->names, b->id); in get_immediate_parent()
3012 if (!cn || !is_valid_crush_name(cn->cn_name)) in get_immediate_parent()
3022 parent_loc->cl_name = cn->cn_name; in get_immediate_parent()