summaryrefslogtreecommitdiffstats
path: root/fs/ext2/balloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2/balloc.c')
-rw-r--r--fs/ext2/balloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index 171de1cf5..4d2b561ee 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -291,6 +291,7 @@ int ext2_new_block (const struct inode * inode, unsigned long goal,
printk ("ext2_new_block: nonexistent device");
return 0;
}
+retry:
lock_super (sb);
es = sb->u.ext2_sb.s_es;
if (le32_to_cpu(es->s_free_blocks_count) <= le32_to_cpu(es->s_r_blocks_count) &&
@@ -298,6 +299,8 @@ int ext2_new_block (const struct inode * inode, unsigned long goal,
(sb->u.ext2_sb.s_resgid == 0 ||
!in_group_p (sb->u.ext2_sb.s_resgid)))) {
unlock_super (sb);
+ if(sb->s_ibasket && free_ibasket(sb))
+ goto retry;
return 0;
}
@@ -389,6 +392,8 @@ repeat:
}
if (k >= sb->u.ext2_sb.s_groups_count) {
unlock_super (sb);
+ if(sb->s_ibasket && free_ibasket(sb))
+ goto retry;
return 0;
}
bitmap_nr = load_block_bitmap (sb, i);