VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: David S. Miller <davem@davemloft.net> 2014-09-26 16:21:29 -0400 committer: David S. Miller <davem@davemloft.net> 2014-09-26 16:21:29 -0400 commit: e7af85db54430c7cb7e15de9b3e0f72074d94dfb parent: 445f7f4d62628cb2971db884084d162ecb622ec7
Commit Summary:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Diffstat:
1 file changed, 4 insertions, 3 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 7b36e4d40ed7..16d02639d334 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -588,13 +588,13 @@ EXPORT_SYMBOL_GPL(rhashtable_init);
  * rhashtable_destroy - destroy hash table
  * @ht:		the hash table to destroy
  *
- * Frees the bucket array.
+ * Frees the bucket array. This function is not rcu safe, therefore the caller
+ * has to make sure that no resizing may happen by unpublishing the hashtable
+ * and waiting for the quiescent cycle before releasing the bucket array.
  */
 void rhashtable_destroy(const struct rhashtable *ht)
 {
-	const struct bucket_table *tbl = rht_dereference(ht->tbl, ht);
-
-	bucket_table_free(tbl);
+	bucket_table_free(ht->tbl);
 }
 EXPORT_SYMBOL_GPL(rhashtable_destroy);