projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'defconfig-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git]
/
lib
/
rhashtable.c
diff --git
a/lib/rhashtable.c
b/lib/rhashtable.c
index 7b36e4d40ed7e3a1e0e1ddb87f386768c8b256aa..3d2b4733f6cb7cf2fdca301d80f7d7bb0d6d61cc 100644
(file)
--- a/
lib/rhashtable.c
+++ b/
lib/rhashtable.c
@@
-54,7
+54,7
@@
static u32 __hashfn(const struct rhashtable *ht, const void *key,
/**
* rhashtable_hashfn - compute hash for key of given length
/**
* rhashtable_hashfn - compute hash for key of given length
- * @ht: hash table to compu
a
te for
+ * @ht: hash table to compute for
* @key: pointer to key
* @len: length of key
*
* @key: pointer to key
* @len: length of key
*
@@
-85,7
+85,7
@@
static u32 obj_hashfn(const struct rhashtable *ht, const void *ptr, u32 hsize)
/**
* rhashtable_obj_hashfn - compute hash for hashed object
/**
* rhashtable_obj_hashfn - compute hash for hashed object
- * @ht: hash table to compu
a
te for
+ * @ht: hash table to compute for
* @ptr: pointer to hashed object
*
* Computes the hash value using the hash function `hashfn` respectively
* @ptr: pointer to hashed object
*
* Computes the hash value using the hash function `hashfn` respectively
@@
-588,13
+588,13
@@
EXPORT_SYMBOL_GPL(rhashtable_init);
* rhashtable_destroy - destroy hash table
* @ht: the hash table to destroy
*
* 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)
{
*/
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);
}
EXPORT_SYMBOL_GPL(rhashtable_destroy);