]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: use min_size variable to setup block rsv in btrfs_replace_file_extents()
authorFilipe Manana <fdmanana@suse.com>
Mon, 20 Apr 2026 10:28:47 +0000 (11:28 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Jun 2026 13:53:30 +0000 (15:53 +0200)
commit2d1e969b44f56b895b5df3ee3e4c8eb35c4916ac
tree95339a33c28cbbff942244f2b8c6a075e7910d91
parent18d32b0013efba19f7ad3e5b08d7aee813d604a6
btrfs: use min_size variable to setup block rsv in btrfs_replace_file_extents()

There's no need to calculate again the size for the temporary block
reserve in btrfs_replace_file_extents() - we have already calculated it
and stored it in the 'min_size' variable.

So use the variable to make it more clear and also make the variable const
since it's not supposed to change during the whole function.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c