]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: move the exclusive operation functions into fs.c
authorFilipe Manana <fdmanana@suse.com>
Mon, 16 Dec 2024 12:10:19 +0000 (12:10 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:17 +0000 (14:53 +0100)
commit0b93369104ac5f65721793e038cafa4b3e58fdba
treef5916ab335f1d98e223e36d97c342a2c92a8c896
parenta6f0bcf9b190219fa2686247dfc99a44e597aa11
btrfs: move the exclusive operation functions into fs.c

The declarations for the exclusive operation functions are located at fs.h
but their definitions are in ioctl.c, which doesn't make much sense since
(most of them) are used in several files other than ioctl.c. Since they
are used in several files and they are generic enough, move them out of
ioctl.c and into fs.c, even the ones that are currently only used at
ioctl.c, for the sake of having them all in the same C file.

This also reduces the module's size.

Before this change:

  $ size fs/btrfs/btrfs.ko
     text    data     bss     dec     hex filename
  1782094  161045   16920 1960059  1de87b fs/btrfs/btrfs.ko

After this change:

  $ size fs/btrfs/btrfs.ko
     text    data     bss     dec     hex filename
  1781492  161037   16920 1959449  1de619 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/ioctl.c