]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: move abort_should_print_stack() to transaction.h
authorFilipe Manana <fdmanana@suse.com>
Mon, 16 Dec 2024 11:26:35 +0000 (11:26 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:17 +0000 (14:53 +0100)
commitb815a78e17b9dd90398561ec7d91891d95f25301
tree8021d83d1cc90843a354804802556dacb0dccdc6
parent63e5f9df7cac7a5bf5da9ce6c36364d74be85f55
btrfs: move abort_should_print_stack() to transaction.h

The function abort_should_print_stack() is declared in transaction.h but
its definition is in ctree.c, which doesn't make sense since ctree.c is
the btree implementation and the function is related to the transaction
code. Move its definition into transaction.h as an inline function since
it's a very short and trivial function, and also add the 'btrfs_' prefix
into its name.

This change also reduces the module size.

Before this change:

  $ size fs/btrfs/btrfs.ko
     text    data     bss     dec     hex filename
  1783148  161137   16920 1961205  1decf5 fs/btrfs/btrfs.ko

After this change:

  $ size fs/btrfs/btrfs.ko
     text    data     bss     dec     hex filename
  1782126  161045   16920 1960091  1de89b 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/ctree.c
fs/btrfs/transaction.h