summaryrefslogtreecommitdiff
path: root/fs/ext4/mballoc.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-08-04 13:19:05 -0700
committerOlof Johansson <olof@lixom.net>2013-08-04 13:19:05 -0700
commit6a33fc8cacfc7fac829c72bd321868be7e72f609 (patch)
treeca8572f214a30c4743b731b4ab2809a980b78369 /fs/ext4/mballoc.c
parent3bd957978bb50390bb07678bc4c125989e9a81a2 (diff)
parent2746a7c272a3242f919fa2fd5a5f2d9f8a41173a (diff)
Merge tag 'fixes-non-3.12' of git://git.infradead.org/linux-mvebu into next/fixes-non-critical
From Jason Cooper: mvebu fixes-non-critical for v3.12 - dove - fix section mismatch (all callers are already _init, so it's just a space issue) * tag 'fixes-non-3.12' of git://git.infradead.org/linux-mvebu: ARM: dove: fix missing __init section of dove_mpp_gpio_mode + Linux 3.11-rc2 Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r--fs/ext4/mballoc.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index a9ff5e5137ca..4bbbf13bd743 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4740,11 +4740,16 @@ do_more:
* blocks being freed are metadata. these blocks shouldn't
* be used until this transaction is committed
*/
+ retry:
new_entry = kmem_cache_alloc(ext4_free_data_cachep, GFP_NOFS);
if (!new_entry) {
- ext4_mb_unload_buddy(&e4b);
- err = -ENOMEM;
- goto error_return;
+ /*
+ * We use a retry loop because
+ * ext4_free_blocks() is not allowed to fail.
+ */
+ cond_resched();
+ congestion_wait(BLK_RW_ASYNC, HZ/50);
+ goto retry;
}
new_entry->efd_start_cluster = bit;
new_entry->efd_group = block_group;