diff options
Diffstat (limited to 'lib/rhashtable.c')
| -rw-r--r-- | lib/rhashtable.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c index c41e21096373..904b419b72f5 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c | |||
| @@ -487,6 +487,9 @@ static void rht_deferred_worker(struct work_struct *work) | |||
| 487 | 487 | ||
| 488 | ht = container_of(work, struct rhashtable, run_work); | 488 | ht = container_of(work, struct rhashtable, run_work); |
| 489 | mutex_lock(&ht->mutex); | 489 | mutex_lock(&ht->mutex); |
| 490 | if (ht->being_destroyed) | ||
| 491 | goto unlock; | ||
| 492 | |||
| 490 | tbl = rht_dereference(ht->tbl, ht); | 493 | tbl = rht_dereference(ht->tbl, ht); |
| 491 | 494 | ||
| 492 | if (ht->p.grow_decision && ht->p.grow_decision(ht, tbl->size)) | 495 | if (ht->p.grow_decision && ht->p.grow_decision(ht, tbl->size)) |
| @@ -494,6 +497,7 @@ static void rht_deferred_worker(struct work_struct *work) | |||
| 494 | else if (ht->p.shrink_decision && ht->p.shrink_decision(ht, tbl->size)) | 497 | else if (ht->p.shrink_decision && ht->p.shrink_decision(ht, tbl->size)) |
| 495 | rhashtable_shrink(ht); | 498 | rhashtable_shrink(ht); |
| 496 | 499 | ||
| 500 | unlock: | ||
| 497 | mutex_unlock(&ht->mutex); | 501 | mutex_unlock(&ht->mutex); |
| 498 | } | 502 | } |
| 499 | 503 | ||
