btrfs: set max_extent_size properly
authorJosef Bacik <jbacik@fb.com>
Fri, 12 Oct 2018 19:32:33 +0000 (15:32 -0400)
committerDavid Sterba <dsterba@suse.com>
Fri, 19 Oct 2018 10:20:03 +0000 (12:20 +0200)
commitad22cf6ea47fa20fbe11ac324a0a15c0a9a4a2a9
tree20bda2ef98b59c3dfde217784dea4caccbe9573b
parent21a94f7acf0f748599ea552af5d9ee7d7e41c72f
btrfs: set max_extent_size properly

We can't use entry->bytes if our entry is a bitmap entry, we need to use
entry->max_extent_size in that case.  Fix up all the logic to make this
consistent.

CC: stable@vger.kernel.org # 4.4+
Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/free-space-cache.c