diff options
| author | 2015-05-18 08:23:37 +0200 | |
|---|---|---|
| committer | 2015-05-18 08:23:37 +0200 | |
| commit | 5a6cc82171dba297ceab49cda47f2bf5616f87b3 (patch) | |
| tree | 1e12036476a4faf4b404a0a4e070d148efafc221 /lib/rhashtable.c | |
| parent | ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450 (diff) | |
| parent | Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/mc13783', 'asoc/fix/uda1380', 'asoc/fix/wm8960' and 'asoc/fix/wm8994' into asoc-linus (diff) | |
| download | wireguard-linux-5a6cc82171dba297ceab49cda47f2bf5616f87b3.tar.xz wireguard-linux-5a6cc82171dba297ceab49cda47f2bf5616f87b3.zip | |
Merge tag 'asoc-fix-v4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.1
A few more fixes for v4.1, some driver fixes plus one core fix which
fixes registration of DAI links when adding prefixes to CODECs to
deuplicate in multi-CODEC systems.
Diffstat (limited to 'lib/rhashtable.c')
| -rw-r--r-- | lib/rhashtable.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c index 4898442b837f..b28df4019ade 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c @@ -405,13 +405,18 @@ int rhashtable_insert_rehash(struct rhashtable *ht) if (rht_grow_above_75(ht, tbl)) size *= 2; - /* More than two rehashes (not resizes) detected. */ - else if (WARN_ON(old_tbl != tbl && old_tbl->size == size)) + /* Do not schedule more than one rehash */ + else if (old_tbl != tbl) return -EBUSY; new_tbl = bucket_table_alloc(ht, size, GFP_ATOMIC); - if (new_tbl == NULL) + if (new_tbl == NULL) { + /* Schedule async resize/rehash to try allocation + * non-atomic context. + */ + schedule_work(&ht->run_work); return -ENOMEM; + } err = rhashtable_rehash_attach(ht, tbl, new_tbl); if (err) { |
