]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: add a fast path to xfs_buf_zero when b_addr is set
authorChristoph Hellwig <hch@lst.de>
Mon, 10 Mar 2025 13:19:05 +0000 (14:19 +0100)
committerCarlos Maiolino <cem@kernel.org>
Mon, 10 Mar 2025 13:29:44 +0000 (14:29 +0100)
commitf2a3717a74c2cf01e29ea3aba355e171eb0d5f5f
tree88fec990feaab22a9e83a05bac62f5071b27a9e0
parent69659e46b7588d2fd5e4644dec9e61127bbfd5f3
xfs: add a fast path to xfs_buf_zero when b_addr is set

No need to walk the page list if bp->b_addr is valid.  That also means
b_offset doesn't need to be taken into account in the unmapped loop as
b_offset is only set for kmem backed buffers which are always mapped.

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_buf.c