]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: factor out btrfs_return_free_space()
authorNaohiro Aota <naohiro.aota@wdc.com>
Thu, 14 Nov 2024 08:04:27 +0000 (17:04 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:14 +0000 (14:53 +0100)
commit3704db1013232465ee3db742dc31853c44daf68c
treec3e4f7d2b17b7c1a236a651c4fc297535a96d7b3
parentbfcf6d04f8ee817b2cb7c238e0a14392a3245f45
btrfs: factor out btrfs_return_free_space()

Factor out a part of unpin_extent_range() that returns space back to the
space info, prioritizing global block reserve.  Also, move the "len"
variable into the loop to clarify we don't need to carry it beyond an
iteration.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c
fs/btrfs/space-info.c
fs/btrfs/space-info.h