]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: improve the calling convention for the xlog_write helpers
authorChristoph Hellwig <hch@lst.de>
Wed, 12 Nov 2025 12:14:23 +0000 (13:14 +0100)
committerCarlos Maiolino <cem@kernel.org>
Wed, 21 Jan 2026 11:57:16 +0000 (12:57 +0100)
commita3eb1f9cf85ff88939f5a9d360efc3eb73469afd
treef8a286813eab8aac78a3218804a0534f5789185d
parenta82d7aac758161c310345bb5066f344c21ee783b
xfs: improve the calling convention for the xlog_write helpers

The xlog_write chain passes around the same seven variables that are
often passed by reference. Add a xlog_write_data structure to contain
them to improve code generation and readability.

This change increases the generated code size by about 140 bytes for my
x86_64 build, which is hopefully worth the much easier to follow code:

$ size fs/xfs/xfs_log.o*
   text    data     bss     dec     hex filename
  29300    1730     176   31206    79e6 fs/xfs/xfs_log.o
  29160    1730     176   31066    795a fs/xfs/xfs_log.o.old

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_log.c