]> www.infradead.org Git - nvme.git/commit
btrfs: simplify setting the full backref flag at update_ref_for_cow()
authorFilipe Manana <fdmanana@suse.com>
Tue, 18 Jun 2024 14:21:50 +0000 (15:21 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:26 +0000 (15:33 +0200)
commit716404e59a17f917b32c649a733c9a23e5d15ad4
tree9b27875b05bb8d2e6fcca4b536806ce7fd8aad74
parent119474bdbac0858053cf367c8c932dd5c4bb4e85
btrfs: simplify setting the full backref flag at update_ref_for_cow()

We keep a "new_flags" variable only to keep track if we need to update the
metadata extent's flags, and when we set BTRFS_BLOCK_FLAG_FULL_BACKREF in
the variable, we do it in an inner scope. Then check in an outer scope
if the variable is not 0 and if so call btrfs_set_disk_extent_flags().
The variable isn't used for anything else. This is somewhat confusing, so
to make it more straightforward update the extent's flags where we are
currently updating "new_flags" and remove the variable.

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