]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: simplify boolean argument for btrfs_inc_ref()/btrfs_dec_ref()
authorSun YangKai <sunk67188@gmail.com>
Sat, 22 Nov 2025 06:00:44 +0000 (14:00 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 05:38:31 +0000 (06:38 +0100)
commita5eb9024368dac8cc6b317c1577c6348e5334243
treeee925200c7b2a719f2feff6b86c14cd8f079ea7c
parent8bfee251b7f5e54437e893c6daa964caded8a860
btrfs: simplify boolean argument for btrfs_inc_ref()/btrfs_dec_ref()

Replace open-coded if/else blocks with the boolean directly and introduce
local const bool variables, making the code shorter and easier to read.

Signed-off-by: Sun YangKai <sunk67188@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c
fs/btrfs/extent-tree.c