diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/rhashtable.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c index a2c78810ebc1..fc0dd8ee5c35 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c | |||
| @@ -589,13 +589,13 @@ EXPORT_SYMBOL_GPL(rhashtable_init); | |||
| 589 | * rhashtable_destroy - destroy hash table | 589 | * rhashtable_destroy - destroy hash table |
| 590 | * @ht: the hash table to destroy | 590 | * @ht: the hash table to destroy |
| 591 | * | 591 | * |
| 592 | * Frees the bucket array. | 592 | * Frees the bucket array. This function is not rcu safe, therefore the caller |
| 593 | * has to make sure that no resizing may happen by unpublishing the hashtable | ||
| 594 | * and waiting for the quiescent cycle before releasing the bucket array. | ||
| 593 | */ | 595 | */ |
| 594 | void rhashtable_destroy(const struct rhashtable *ht) | 596 | void rhashtable_destroy(const struct rhashtable *ht) |
| 595 | { | 597 | { |
| 596 | const struct bucket_table *tbl = rht_dereference(ht->tbl, ht); | 598 | bucket_table_free(ht->tbl); |
| 597 | |||
| 598 | bucket_table_free(tbl); | ||
| 599 | } | 599 | } |
| 600 | EXPORT_SYMBOL_GPL(rhashtable_destroy); | 600 | EXPORT_SYMBOL_GPL(rhashtable_destroy); |
| 601 | 601 | ||
