diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2008-02-06 04:36:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:00 -0500 |
commit | 7f0adaecede9ca68d9fcddae5a5a7ed6fc31a5e5 (patch) | |
tree | 0575ad7ef65fb4277138bde9167221f8212930b4 | |
parent | 73de76a0a42efa173c29aff32e555ac6de992573 (diff) |
ext2: return after ext2_error in case of failures
This fixes some instances where we were continuing after calling
ext2_error. ext2_error call panic only if errors=panic mount option is
set. So we need to make sure we return correctly after ext2_error call.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/ext2/balloc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 377ad172d74b..794008b6ce29 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c | |||
@@ -474,11 +474,13 @@ do_more: | |||
474 | in_range (block, le32_to_cpu(desc->bg_inode_table), | 474 | in_range (block, le32_to_cpu(desc->bg_inode_table), |
475 | sbi->s_itb_per_group) || | 475 | sbi->s_itb_per_group) || |
476 | in_range (block + count - 1, le32_to_cpu(desc->bg_inode_table), | 476 | in_range (block + count - 1, le32_to_cpu(desc->bg_inode_table), |
477 | sbi->s_itb_per_group)) | 477 | sbi->s_itb_per_group)) { |
478 | ext2_error (sb, "ext2_free_blocks", | 478 | ext2_error (sb, "ext2_free_blocks", |
479 | "Freeing blocks in system zones - " | 479 | "Freeing blocks in system zones - " |
480 | "Block = %lu, count = %lu", | 480 | "Block = %lu, count = %lu", |
481 | block, count); | 481 | block, count); |
482 | goto error_return; | ||
483 | } | ||
482 | 484 | ||
483 | for (i = 0, group_freed = 0; i < count; i++) { | 485 | for (i = 0, group_freed = 0; i < count; i++) { |
484 | if (!ext2_clear_bit_atomic(sb_bgl_lock(sbi, block_group), | 486 | if (!ext2_clear_bit_atomic(sb_bgl_lock(sbi, block_group), |
@@ -1311,11 +1313,13 @@ allocated: | |||
1311 | in_range(ret_block, le32_to_cpu(gdp->bg_inode_table), | 1313 | in_range(ret_block, le32_to_cpu(gdp->bg_inode_table), |
1312 | EXT2_SB(sb)->s_itb_per_group) || | 1314 | EXT2_SB(sb)->s_itb_per_group) || |
1313 | in_range(ret_block + num - 1, le32_to_cpu(gdp->bg_inode_table), | 1315 | in_range(ret_block + num - 1, le32_to_cpu(gdp->bg_inode_table), |
1314 | EXT2_SB(sb)->s_itb_per_group)) | 1316 | EXT2_SB(sb)->s_itb_per_group)) { |
1315 | ext2_error(sb, "ext2_new_blocks", | 1317 | ext2_error(sb, "ext2_new_blocks", |
1316 | "Allocating block in system zone - " | 1318 | "Allocating block in system zone - " |
1317 | "blocks from "E2FSBLK", length %lu", | 1319 | "blocks from "E2FSBLK", length %lu", |
1318 | ret_block, num); | 1320 | ret_block, num); |
1321 | goto out; | ||
1322 | } | ||
1319 | 1323 | ||
1320 | performed_allocation = 1; | 1324 | performed_allocation = 1; |
1321 | 1325 | ||