• Home
  • Raw
  • Download

Lines Matching refs:newtbl

291 	struct mesh_table *newtbl;  in mesh_table_alloc()  local
293 newtbl = kmalloc(sizeof(struct mesh_table), GFP_KERNEL); in mesh_table_alloc()
294 if (!newtbl) in mesh_table_alloc()
297 newtbl->hash_buckets = kzalloc(sizeof(struct hlist_head) * in mesh_table_alloc()
300 if (!newtbl->hash_buckets) { in mesh_table_alloc()
301 kfree(newtbl); in mesh_table_alloc()
305 newtbl->hashwlock = kmalloc(sizeof(spinlock_t) * in mesh_table_alloc()
307 if (!newtbl->hashwlock) { in mesh_table_alloc()
308 kfree(newtbl->hash_buckets); in mesh_table_alloc()
309 kfree(newtbl); in mesh_table_alloc()
313 newtbl->size_order = size_order; in mesh_table_alloc()
314 newtbl->hash_mask = (1 << size_order) - 1; in mesh_table_alloc()
315 atomic_set(&newtbl->entries, 0); in mesh_table_alloc()
316 get_random_bytes(&newtbl->hash_rnd, in mesh_table_alloc()
317 sizeof(newtbl->hash_rnd)); in mesh_table_alloc()
318 for (i = 0; i <= newtbl->hash_mask; i++) in mesh_table_alloc()
319 spin_lock_init(&newtbl->hashwlock[i]); in mesh_table_alloc()
321 return newtbl; in mesh_table_alloc()
361 struct mesh_table *newtbl; in mesh_table_grow() local
370 newtbl = mesh_table_alloc(tbl->size_order + 1); in mesh_table_grow()
371 if (!newtbl) in mesh_table_grow()
374 newtbl->free_node = tbl->free_node; in mesh_table_grow()
375 newtbl->mean_chain_len = tbl->mean_chain_len; in mesh_table_grow()
376 newtbl->copy_node = tbl->copy_node; in mesh_table_grow()
377 atomic_set(&newtbl->entries, atomic_read(&tbl->entries)); in mesh_table_grow()
382 if (tbl->copy_node(p, newtbl) < 0) in mesh_table_grow()
385 return newtbl; in mesh_table_grow()
388 for (i = 0; i <= newtbl->hash_mask; i++) { in mesh_table_grow()
389 hlist_for_each_safe(p, q, &newtbl->hash_buckets[i]) in mesh_table_grow()
392 __mesh_table_free(newtbl); in mesh_table_grow()