xfs: factor out a xfs_btree_owner helper
authorDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:35:22 +0000 (12:35 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:35:22 +0000 (12:35 -0800)
commit2054cf051698d30cc9479678c2b807a364248f38
treecdd74392897fc38fd2afb1916aabdbe787c69f62
parent07b7f2e3172b97da2a7ac273ecbaf173cc09a9f4
xfs: factor out a xfs_btree_owner helper

Split out a helper to calculate the owner for a given btree instead of
duplicating the logic in two places.  While we're at it, make the
bc_ag/bc_ino switch logic depend on the correct geometry flag.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: break this up into two patches for the owner check]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/libxfs/xfs_btree.c