aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/mballoc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r--fs/ext4/mballoc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 2c10b5058a8..e4f30de11a9 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4395,7 +4395,12 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
4395 /* 4395 /*
4396 * With delalloc we already reserved the blocks 4396 * With delalloc we already reserved the blocks
4397 */ 4397 */
4398 if (ext4_claim_free_blocks(sbi, ar->len)) { 4398 while (ar->len && ext4_claim_free_blocks(sbi, ar->len)) {
4399 /* let others to free the space */
4400 yield();
4401 ar->len = ar->len >> 1;
4402 }
4403 if (!ar->len) {
4399 *errp = -ENOSPC; 4404 *errp = -ENOSPC;
4400 return 0; 4405 return 0;
4401 } 4406 }