]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: accessors: set target address at initialization
authorDavid Sterba <dsterba@suse.com>
Tue, 1 Jul 2025 17:23:53 +0000 (19:23 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 22:09:21 +0000 (00:09 +0200)
commitc8b33a57fba29733518d469be062ca6fea03203d
treee3644b079bec35106627c3a40e8aa9bd9d33d990
parent1ed0f75d57aef3c447fbc78885c90421e40c1755
btrfs: accessors: set target address at initialization

The target address for the read/write can be simplified as it's the same
expression for the first folio. This improves the generated code as the
folio address does not have to be cached on stack.

Stack usage reduction:

  btrfs_set_32                                           -8 (32 -> 24)
  btrfs_set_64                                           -8 (32 -> 24)
  btrfs_get_16                                           -8 (24 -> 16)

Code size reduction:

     text    data     bss     dec     hex filename
  1454459  115665   16088 1586212  183424 pre/btrfs.ko
  1454279  115665   16088 1586032  183370 post/btrfs.ko

  DELTA: -180

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/accessors.c