struct maple_alloc *ret, *node = mas->alloc;
unsigned long total = mas_allocated(mas);
- if (!total) // nothing or a request pending.
+ if (unlikely(!total)) // nothing or a request pending.
return NULL;
if (total == 1) { // single allocation in this ma_state
new_head:
ret->total = 0;
ret->node_count = 0;
- if (ret->request_count)
+ if (ret->request_count) {
mas_set_alloc_req(mas, ret->request_count + 1);
- ret->request_count = 0;
+ ret->request_count = 0;
+ }
return (struct maple_node *)ret;
}
static inline void mas_push_node(struct ma_state *mas, struct maple_enode *used)