[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1420609318-3261-7-git-send-email-ying.xue@windriver.com>
Date: Wed, 7 Jan 2015 13:41:57 +0800
From: Ying Xue <ying.xue@...driver.com>
To: <tgraf@...g.ch>
CC: <davem@...emloft.net>, <jon.maloy@...csson.com>,
<Paul.Gortmaker@...driver.com>, <erik.hugne@...csson.com>,
<netdev@...r.kernel.org>, <tipc-discussion@...ts.sourceforge.net>
Subject: [PATCH net-next v2 6/7] rhashtable: initialize atomic nelems variable
Signed-off-by: Ying Xue <ying.xue@...driver.com>
Cc: Thomas Graf <tgraf@...g.ch>
---
lib/rhashtable.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 7fb474b..8023b55 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -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);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists