diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2008-01-28 23:58:27 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-01-28 23:58:27 -0500 |
commit | cb47dce79145d04634156fd18437e1e78af712e4 (patch) | |
tree | d43ee74c88b8ea8463cff9741fa0f4f1e9604c0a | |
parent | 91b51a018d7711b20e9e0bb14c3d790de4e310d4 (diff) |
ext4: Return after ext4_error in case of failures
This fix some instances where we were continuing after calling
ext4_error. ext4_error call panic only if errors=panic mount option is
set. So we need to make sure we return correctly after ext4_error call
Reported by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
-rw-r--r-- | fs/ext4/balloc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 9568a57c607c..ff3428e195b4 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c | |||
@@ -587,11 +587,13 @@ do_more: | |||
587 | in_range(ext4_inode_bitmap(sb, desc), block, count) || | 587 | in_range(ext4_inode_bitmap(sb, desc), block, count) || |
588 | in_range(block, ext4_inode_table(sb, desc), sbi->s_itb_per_group) || | 588 | in_range(block, ext4_inode_table(sb, desc), sbi->s_itb_per_group) || |
589 | in_range(block + count - 1, ext4_inode_table(sb, desc), | 589 | in_range(block + count - 1, ext4_inode_table(sb, desc), |
590 | sbi->s_itb_per_group)) | 590 | sbi->s_itb_per_group)) { |
591 | ext4_error (sb, "ext4_free_blocks", | 591 | ext4_error (sb, "ext4_free_blocks", |
592 | "Freeing blocks in system zones - " | 592 | "Freeing blocks in system zones - " |
593 | "Block = %llu, count = %lu", | 593 | "Block = %llu, count = %lu", |
594 | block, count); | 594 | block, count); |
595 | goto error_return; | ||
596 | } | ||
595 | 597 | ||
596 | /* | 598 | /* |
597 | * We are about to start releasing blocks in the bitmap, | 599 | * We are about to start releasing blocks in the bitmap, |
@@ -1690,11 +1692,13 @@ allocated: | |||
1690 | in_range(ret_block, ext4_inode_table(sb, gdp), | 1692 | in_range(ret_block, ext4_inode_table(sb, gdp), |
1691 | EXT4_SB(sb)->s_itb_per_group) || | 1693 | EXT4_SB(sb)->s_itb_per_group) || |
1692 | in_range(ret_block + num - 1, ext4_inode_table(sb, gdp), | 1694 | in_range(ret_block + num - 1, ext4_inode_table(sb, gdp), |
1693 | EXT4_SB(sb)->s_itb_per_group)) | 1695 | EXT4_SB(sb)->s_itb_per_group)) { |
1694 | ext4_error(sb, "ext4_new_block", | 1696 | ext4_error(sb, "ext4_new_block", |
1695 | "Allocating block in system zone - " | 1697 | "Allocating block in system zone - " |
1696 | "blocks from %llu, length %lu", | 1698 | "blocks from %llu, length %lu", |
1697 | ret_block, num); | 1699 | ret_block, num); |
1700 | goto out; | ||
1701 | } | ||
1698 | 1702 | ||
1699 | performed_allocation = 1; | 1703 | performed_allocation = 1; |
1700 | 1704 | ||