Skip to content
Commit 4da8b76d authored by Omar Sandoval's avatar Omar Sandoval Committed by David Sterba
Browse files

Btrfs: update total_bytes_pinned when pinning down extents



The extents marked in pin_down_extent() will be unpinned later in
unpin_extent_range(), which decrements total_bytes_pinned.
pin_down_extent() must increment the counter to avoid underflowing it.
Also adjust btrfs_free_tree_block() to avoid accounting for the same
extent twice.

Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
Tested-by: default avatarHolger Hoffstätte <holger@applied-asynchrony.com>
Reviewed-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 55e8196a
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