Lines Matching refs:new
96 struct idr_layer *new; in idr_layer_alloc() local
109 new = kmem_cache_zalloc(idr_layer_cache, gfp_mask | __GFP_NOWARN); in idr_layer_alloc()
110 if (new) in idr_layer_alloc()
111 return new; in idr_layer_alloc()
119 new = __this_cpu_read(idr_preload_head); in idr_layer_alloc()
120 if (new) { in idr_layer_alloc()
121 __this_cpu_write(idr_preload_head, new->ary[0]); in idr_layer_alloc()
123 new->ary[0] = NULL; in idr_layer_alloc()
126 if (new) in idr_layer_alloc()
127 return new; in idr_layer_alloc()
195 struct idr_layer *new; in __idr_pre_get() local
196 new = kmem_cache_zalloc(idr_layer_cache, gfp_mask); in __idr_pre_get()
197 if (new == NULL) in __idr_pre_get()
199 move_to_free_list(idp, new); in __idr_pre_get()
224 struct idr_layer *p, *new; in sub_alloc() local
273 new = idr_layer_alloc(gfp_mask, layer_idr); in sub_alloc()
274 if (!new) in sub_alloc()
276 new->layer = l-1; in sub_alloc()
277 new->prefix = id & idr_layer_prefix_mask(new->layer); in sub_alloc()
278 rcu_assign_pointer(p->ary[m], new); in sub_alloc()
293 struct idr_layer *p, *new; in idr_get_empty_slot() local
322 if (!(new = idr_layer_alloc(gfp_mask, layer_idr))) { in idr_get_empty_slot()
328 for (new = p; p && p != idp->top; new = p) { in idr_get_empty_slot()
330 new->ary[0] = NULL; in idr_get_empty_slot()
331 new->count = 0; in idr_get_empty_slot()
332 bitmap_clear(new->bitmap, 0, IDR_SIZE); in idr_get_empty_slot()
333 __move_to_free_list(idp, new); in idr_get_empty_slot()
338 new->ary[0] = p; in idr_get_empty_slot()
339 new->count = 1; in idr_get_empty_slot()
340 new->layer = layers-1; in idr_get_empty_slot()
341 new->prefix = id & idr_layer_prefix_mask(new->layer); in idr_get_empty_slot()
343 __set_bit(0, new->bitmap); in idr_get_empty_slot()
344 p = new; in idr_get_empty_slot()
414 struct idr_layer *new; in idr_preload() local
417 new = kmem_cache_zalloc(idr_layer_cache, gfp_mask); in idr_preload()
419 if (!new) in idr_preload()
423 new->ary[0] = __this_cpu_read(idr_preload_head); in idr_preload()
424 __this_cpu_write(idr_preload_head, new); in idr_preload()