Btrfs: Fix integer overflow when calculating bytes_per_bitmap
authorFeifei Xu <xufeifei@linux.vnet.ibm.com>
Wed, 1 Jun 2016 11:18:24 +0000 (19:18 +0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 2 Jun 2016 17:22:49 +0000 (19:22 +0200)
commit0ef6447a3d2f014e49069c4da33f905ed803aa2a
tree4a6640e63442d44d32bedc2a6c854d998bc79872
parent5473e0c426ffaeaa19734987b153c2a7f33b8706
Btrfs: Fix integer overflow when calculating bytes_per_bitmap

On ppc64, bytes_per_bitmap will be (65536*8*65536). Hence append UL to
fix integer overflow.

Reviewed-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: Feifei Xu <xufeifei@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/free-space-cache.c
fs/btrfs/tests/free-space-tests.c