X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fext4%2Fmballoc.c;h=e4f30de11a9dcd14e53e18d17718ffcf0fa8e170;hb=030ba6bc67b4f2bc5cd174f57785a1745c929abe;hp=2c10b5058a8da7d4604173310155cfb0427bc639;hpb=a30d542a0035b886ffaafd0057ced0a2b28c3a4f;p=linux-2.6-omap-h63xx.git 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, /* * With delalloc we already reserved the blocks */ - if (ext4_claim_free_blocks(sbi, ar->len)) { + while (ar->len && ext4_claim_free_blocks(sbi, ar->len)) { + /* let others to free the space */ + yield(); + ar->len = ar->len >> 1; + } + if (!ar->len) { *errp = -ENOSPC; return 0; }