aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/balloc.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index 25dec8633c94..10bb02c3f25c 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -149,11 +149,12 @@ read_block_bitmap(struct super_block *sb, unsigned int block_group)
149 block_group, le32_to_cpu(desc->bg_block_bitmap)); 149 block_group, le32_to_cpu(desc->bg_block_bitmap));
150 return NULL; 150 return NULL;
151 } 151 }
152 if (!ext2_valid_block_bitmap(sb, desc, block_group, bh)) {
153 brelse(bh);
154 return NULL;
155 }
156 152
153 ext2_valid_block_bitmap(sb, desc, block_group, bh);
154 /*
155 * file system mounted not to panic on error, continue with corrupt
156 * bitmap
157 */
157 return bh; 158 return bh;
158} 159}
159 160
@@ -1380,7 +1381,12 @@ allocated:
1380 "Allocating block in system zone - " 1381 "Allocating block in system zone - "
1381 "blocks from "E2FSBLK", length %lu", 1382 "blocks from "E2FSBLK", length %lu",
1382 ret_block, num); 1383 ret_block, num);
1383 goto out; 1384 /*
1385 * ext2_try_to_allocate marked the blocks we allocated as in
1386 * use. So we may want to selectively mark some of the blocks
1387 * as free
1388 */
1389 goto retry_alloc;
1384 } 1390 }
1385 1391
1386 performed_allocation = 1; 1392 performed_allocation = 1;