OSDN Git Service

btrfs: set max_extent_size properly
authorJosef Bacik <jbacik@fb.com>
Fri, 12 Oct 2018 19:32:33 +0000 (15:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:59 +0000 (11:08 -0800)
commit4a351e751731e1358c7ec71b18478bbd9ebdde08
tree7f6dd8dfa0fcb26cb53951643e7a205a59a089ea
parente982beca3e4e989716dda88d215d1b96b585e542
btrfs: set max_extent_size properly

commit ad22cf6ea47fa20fbe11ac324a0a15c0a9a4a2a9 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/free-space-cache.c