diff options
| author | Greg Kroah-Hartman <[email protected]> | 2015-05-08 14:38:55 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2015-05-08 14:38:55 +0200 |
| commit | b4da00601edd39184fa187d5fd6dfc36232991cc (patch) | |
| tree | f58bafde4efd814bb78b4f531b1eab48dcf8e561 /lib | |
| parent | d5a7d45fb5b667fd10a225ccf11fe395fb2417d9 (diff) | |
| parent | 5ebe6afaf0057ac3eaeb98defd5456894b446d22 (diff) | |
Merge 4.1-rc2 into staging-next
We want the fixes in here to make merges and testing easier.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib')
| -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) { |