]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: move btrfs_is_empty_uuid() from ioctl.c into fs.c
authorFilipe Manana <fdmanana@suse.com>
Mon, 16 Dec 2024 12:27:07 +0000 (12:27 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:17 +0000 (14:53 +0100)
commita5b3f117daead61c3c9c88cd1159d38fa4ad1362
tree0dab5ba794d0b8f672f398af879942f9e613e8a2
parent0b93369104ac5f65721793e038cafa4b3e58fdba
btrfs: move btrfs_is_empty_uuid() from ioctl.c into fs.c

It's a generic helper not specific to ioctls and used in several places,
so move it out from ioctl.c and into fs.c. While at it change its return
type from int to bool and declare the loop variable in the loop itself.

This also slightly reduces the module's size.

Before this change:

  $ size fs/btrfs/btrfs.ko
     text    data     bss     dec     hex filename
  1781492  161037   16920 1959449  1de619 fs/btrfs/btrfs.ko

After this change:

  $ size fs/btrfs/btrfs.ko
     text    data     bss     dec     hex filename
  1781340  161037   16920 1959297  1de581 fs/btrfs/btrfs.ko

Reviewed-by: Qu Wenruo <wqu@suse.com>
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>
fs/btrfs/fs.c
fs/btrfs/fs.h
fs/btrfs/ioctl.c
fs/btrfs/ioctl.h