On Sun, May 08, 2016 at 03:08:00PM +0200, Adam Borowski wrote: > UBSAN: Undefined behaviour in fs/btrfs/extent-tree.c:4623:21 > signed integer overflow: > 10808 * 262144 cannot be represented in type 'int [8]' > > If 8192<=items<16384, we request a writeback of an insane number of pages > which is benign (everything will be written). But if items>=16384, the > space reservation won't be enough. > > Signed-off-by: Adam Borowski <kilob...@angband.pl>
Reviewed-by: David Sterba <dste...@suse.com> I think this is the best fix, although I usually do not like to see random type casts. In this case, we'd have to change items to something else and propagate the change trhough several functions for no apparent gain. Just to satisfy one multiplication. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html