]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.31.8/0018-ext4-Remove-unneeded-BUG_ON-in-ext4_move_extents.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.31.8 / 0018-ext4-Remove-unneeded-BUG_ON-in-ext4_move_extents.patch
CommitLineData
7f041dd7
GKH
1From 453ad06301204bd60bd132733506972f02f986a2 Mon Sep 17 00:00:00 2001
2From: Akira Fujita <a-fujita@rs.jp.nec.com>
3Date: Sat, 5 Sep 2009 22:11:55 -0400
4Subject: [PATCH 18/85] ext4: Remove unneeded BUG_ON() in ext4_move_extents()
5
6(cherry picked from commit daea696dbac0e33af3cfe304efbfb8d74e0effe6)
7
8The ext4_move_extents() functions checks with BUG_ON() whether the
9exchanged blocks count accords with request blocks count. But, if the
10target range (orig_start + len) includes sparse block(s), 'moved_len'
11(exchanged blocks count) does not agree with 'len' (request blocks
12count), since sparse block is not counted in 'moved_len'. This causes
13us to hit the BUG_ON(), even though the function succeeded.
14
15Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com>
16Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18---
19 fs/ext4/move_extent.c | 3 ---
20 1 file changed, 3 deletions(-)
21
22--- a/fs/ext4/move_extent.c
23+++ b/fs/ext4/move_extent.c
24@@ -1322,8 +1322,5 @@ out2:
25 if (ret)
26 return ret;
27
28- /* All of the specified blocks must be exchanged in succeed */
29- BUG_ON(*moved_len != len);
30-
31 return 0;
32 }