aboutsummaryrefslogtreecommitdiff
path: root/fs/ext4/mballoc.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-07-22 11:16:51 +0100
committerMark Brown <broonie@linaro.org>2013-07-22 11:16:51 +0100
commit9f6772da061814c2962aeb7d79231f7510dba313 (patch)
treee0c4a856204af6adff125ee61fe1f3059cada71b /fs/ext4/mballoc.c
parentd998ec4860d366424a55059093bb022beb38a61d (diff)
parent0f4a56e16d5fc9028b62ba529177a3109513e111 (diff)
Merge tag 'v3.10.2' into linux-linaro-lsk-androidlsk-android
This is the 3.10.2 stable release
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 def84082a9a..59c6750b894 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4735,11 +4735,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;