Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 545a148e authored by Ying Xue's avatar Ying Xue Committed by David S. Miller
Browse files

rhashtable: initialize atomic nelems variable



Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
Cc: Thomas Graf <tgraf@suug.ch>
Acked-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c0c09bfd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -847,6 +847,7 @@ int rhashtable_init(struct rhashtable *ht, struct rhashtable_params *params)
	if (tbl == NULL)
		return -ENOMEM;

	atomic_set(&ht->nelems, 0);
	atomic_set(&ht->shift, ilog2(tbl->size));
	RCU_INIT_POINTER(ht->tbl, tbl);
	RCU_INIT_POINTER(ht->future_tbl, tbl);