Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit daea696d authored by Akira Fujita's avatar Akira Fujita Committed by Theodore Ts'o
Browse files

ext4: Remove unneeded BUG_ON() in ext4_move_extents()



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: default avatarAkira Fujita <a-fujita@rs.jp.nec.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 70d5d3dc
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1322,8 +1322,5 @@ ext4_move_extents(struct file *o_filp, struct file *d_filp,
	if (ret)
		return ret;

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

	return 0;
}