Remove BKL removal patches, since they don't seem to be portable on
[ext4-patch-queue.git] / ext4-Return-after-ext4_error-in-case-of-failures.patch
blob06cdab3008a44bc242f9c197ef528a3ec7dcade5
1 ext4: Return after ext4_error in case of failures
3 From: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
5 This fix some instances where we were continuing after calling
6 ext4_error. ext4_error call panic only if errors=panic mount option is
7 set. So we need to make sure we return correctly after ext4_error call
9 Reported by: Adrian Bunk <bunk@kernel.org>
11 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 ---
14 fs/ext4/balloc.c | 8 ++++++--
15 1 files changed, 6 insertions(+), 2 deletions(-)
18 diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
19 index 9568a57..ff3428e 100644
20 --- a/fs/ext4/balloc.c
21 +++ b/fs/ext4/balloc.c
22 @@ -587,11 +587,13 @@ do_more:
23 in_range(ext4_inode_bitmap(sb, desc), block, count) ||
24 in_range(block, ext4_inode_table(sb, desc), sbi->s_itb_per_group) ||
25 in_range(block + count - 1, ext4_inode_table(sb, desc),
26 - sbi->s_itb_per_group))
27 + sbi->s_itb_per_group)) {
28 ext4_error (sb, "ext4_free_blocks",
29 "Freeing blocks in system zones - "
30 "Block = %llu, count = %lu",
31 block, count);
32 + goto error_return;
33 + }
36 * We are about to start releasing blocks in the bitmap,
37 @@ -1690,11 +1692,13 @@ allocated:
38 in_range(ret_block, ext4_inode_table(sb, gdp),
39 EXT4_SB(sb)->s_itb_per_group) ||
40 in_range(ret_block + num - 1, ext4_inode_table(sb, gdp),
41 - EXT4_SB(sb)->s_itb_per_group))
42 + EXT4_SB(sb)->s_itb_per_group)) {
43 ext4_error(sb, "ext4_new_block",
44 "Allocating block in system zone - "
45 "blocks from %llu, length %lu",
46 ret_block, num);
47 + goto out;
48 + }
50 performed_allocation = 1;