Lines Matching refs:leaf
196 struct posix_msg_tree_node *leaf; in msg_insert() local
202 leaf = rb_entry(parent, struct posix_msg_tree_node, rb_node); in msg_insert()
204 if (likely(leaf->priority == msg->m_type)) in msg_insert()
206 else if (msg->m_type < leaf->priority) { in msg_insert()
213 leaf = info->node_cache; in msg_insert()
216 leaf = kmalloc(sizeof(*leaf), GFP_ATOMIC); in msg_insert()
217 if (!leaf) in msg_insert()
219 INIT_LIST_HEAD(&leaf->msg_list); in msg_insert()
221 leaf->priority = msg->m_type; in msg_insert()
224 info->msg_tree_rightmost = &leaf->rb_node; in msg_insert()
226 rb_link_node(&leaf->rb_node, parent, p); in msg_insert()
227 rb_insert_color(&leaf->rb_node, &info->msg_tree); in msg_insert()
231 list_add_tail(&msg->m_list, &leaf->msg_list); in msg_insert()
235 static inline void msg_tree_erase(struct posix_msg_tree_node *leaf, in msg_tree_erase() argument
238 struct rb_node *node = &leaf->rb_node; in msg_tree_erase()
245 kfree(leaf); in msg_tree_erase()
247 info->node_cache = leaf; in msg_tree_erase()
253 struct posix_msg_tree_node *leaf; in msg_get() local
272 leaf = rb_entry(parent, struct posix_msg_tree_node, rb_node); in msg_get()
273 if (unlikely(list_empty(&leaf->msg_list))) { in msg_get()
277 msg_tree_erase(leaf, info); in msg_get()
280 msg = list_first_entry(&leaf->msg_list, in msg_get()
283 if (list_empty(&leaf->msg_list)) { in msg_get()
284 msg_tree_erase(leaf, info); in msg_get()