]>
Commit | Line | Data |
---|---|---|
7f041dd7 GKH |
1 | From 453ad06301204bd60bd132733506972f02f986a2 Mon Sep 17 00:00:00 2001 |
2 | From: Akira Fujita <a-fujita@rs.jp.nec.com> | |
3 | Date: Sat, 5 Sep 2009 22:11:55 -0400 | |
4 | Subject: [PATCH 18/85] ext4: Remove unneeded BUG_ON() in ext4_move_extents() | |
5 | ||
6 | (cherry picked from commit daea696dbac0e33af3cfe304efbfb8d74e0effe6) | |
7 | ||
8 | The ext4_move_extents() functions checks with BUG_ON() whether the | |
9 | exchanged blocks count accords with request blocks count. But, if the | |
10 | target range (orig_start + len) includes sparse block(s), 'moved_len' | |
11 | (exchanged blocks count) does not agree with 'len' (request blocks | |
12 | count), since sparse block is not counted in 'moved_len'. This causes | |
13 | us to hit the BUG_ON(), even though the function succeeded. | |
14 | ||
15 | Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com> | |
16 | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | |
17 | Signed-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 | } |