btrfs: extent-tree: Use btrfs_ref to refactor add_pinned_bytes()

Since add_pinned_bytes() only needs to know if the extent is metadata
and if it's a chunk tree extent, btrfs_ref is a perfect match for it, as
we don't need various owner/level trick to determine extent type.

Signed-off-by: Qu Wenruo <>
Reviewed-by: Nikolay Borisov <>
Signed-off-by: David Sterba <>
1 file changed