|
@@ -847,6 +847,7 @@ int rhashtable_init(struct rhashtable *ht, struct rhashtable_params *params)
|
|
if (tbl == NULL)
|
|
if (tbl == NULL)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
+ atomic_set(&ht->nelems, 0);
|
|
atomic_set(&ht->shift, ilog2(tbl->size));
|
|
atomic_set(&ht->shift, ilog2(tbl->size));
|
|
RCU_INIT_POINTER(ht->tbl, tbl);
|
|
RCU_INIT_POINTER(ht->tbl, tbl);
|
|
RCU_INIT_POINTER(ht->future_tbl, tbl);
|
|
RCU_INIT_POINTER(ht->future_tbl, tbl);
|