]> Gentwo Git Trees - linux/.git/commit
btrfs: use bool type for btrfs_path members used as booleans
authorFilipe Manana <fdmanana@suse.com>
Fri, 14 Nov 2025 16:00:04 +0000 (16:00 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 21:42:25 +0000 (22:42 +0100)
commitd7fe41044b3ac8f9b5965de499a13ac9ae947e79
tree129e7172e9bb732af95f4c914504c5f2863e78c1
parentc2b2504ece4089697bb7db115dc91e344dfed76f
btrfs: use bool type for btrfs_path members used as booleans

Many fields of struct btrfs_path are used as booleans but their type is
an unsigned int (of one 1 bit width to save space). Change the type to
bool keeping the :1 suffix so that they combine with the previous u8
fields in order to save space. This makes the code more clear by using
explicit true/false and more in line with the preferred style, preserving
the size of the structure.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
20 files changed:
fs/btrfs/backref.c
fs/btrfs/block-group.c
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/defrag.c
fs/btrfs/dev-replace.c
fs/btrfs/extent-tree.c
fs/btrfs/file-item.c
fs/btrfs/free-space-cache.c
fs/btrfs/free-space-tree.c
fs/btrfs/inode-item.c
fs/btrfs/inode.c
fs/btrfs/qgroup.c
fs/btrfs/raid-stripe-tree.c
fs/btrfs/relocation.c
fs/btrfs/scrub.c
fs/btrfs/send.c
fs/btrfs/tree-log.c
fs/btrfs/volumes.c
fs/btrfs/xattr.c