Skip to content
Commit 27f0afc7 authored by Dennis Zhou's avatar Dennis Zhou Committed by David Sterba
Browse files

btrfs: ensure removal of discardable_* in free_bitmap()



Most callers of free_bitmap() only call it if bitmap_info->bytes is 0.
However, there are certain cases where we may free the free space cache
via __btrfs_remove_free_space_cache(). This exposes a path where
free_bitmap() is called regardless. This may result in a bad accounting
situation for discardable_bytes and discardable_extents. So, remove the
stats and call btrfs_discard_update_discardable().

Signed-off-by: default avatarDennis Zhou <dennis@kernel.org>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent f9bb615a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment