[18/90] ext4: Remove unneeded BUG_ON() in ext4_move_extents()

From: Greg KH
Date: Thu Dec 10 2009 - 23:46:56 EST


2.6.31-stable review patch. If anyone has any objections, please let us know.

------------------
(cherry picked from commit daea696dbac0e33af3cfe304efbfb8d74e0effe6)

The ext4_move_extents() functions checks with BUG_ON() whether the
exchanged blocks count accords with request blocks count. But, if the
target range (orig_start + len) includes sparse block(s), 'moved_len'
(exchanged blocks count) does not agree with 'len' (request blocks
count), since sparse block is not counted in 'moved_len'. This causes
us to hit the BUG_ON(), even though the function succeeded.

Signed-off-by: Akira Fujita <a-fujita@xxxxxxxxxxxxx>
Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
fs/ext4/move_extent.c | 3 ---
1 file changed, 3 deletions(-)

--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -1322,8 +1322,5 @@ out2:
if (ret)
return ret;

- /* All of the specified blocks must be exchanged in succeed */
- BUG_ON(*moved_len != len);
-
return 0;
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/