summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-02-22 12:37:26 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-02-22 12:37:26 -0800
commitf9c18129e57df7b33f4257340840525816481da6 (patch)
treedf2ad3d71d37a7d303e36f58110d0fde80137787 /fs/xfs/scrub
parent72c2070f3f52196a2e8b4efced94390b62eb8ac4 (diff)
downloadlinux-f9c18129e57df7b33f4257340840525816481da6.tar.gz
linux-f9c18129e57df7b33f4257340840525816481da6.tar.bz2
linux-f9c18129e57df7b33f4257340840525816481da6.zip
xfs: add a xfs_btree_init_ptr_from_cur
Inode-rooted btrees don't need to initialize the root pointer in the ->init_ptr_from_cur method as the root is found by the xfs_btree_get_iroot method later. Make ->init_ptr_from_cur option for inode rooted btrees by providing a helper that does the right thing for the given btree type and also documents the semantics. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r--fs/xfs/scrub/btree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/scrub/btree.c b/fs/xfs/scrub/btree.c
index 71cfb2a45468..1ec3339755b9 100644
--- a/fs/xfs/scrub/btree.c
+++ b/fs/xfs/scrub/btree.c
@@ -733,7 +733,7 @@ xchk_btree(
* error codes for us.
*/
level = cur->bc_nlevels - 1;
- cur->bc_ops->init_ptr_from_cur(cur, &ptr);
+ xfs_btree_init_ptr_from_cur(cur, &ptr);
if (!xchk_btree_ptr_ok(bs, cur->bc_nlevels, &ptr))
goto out;
error = xchk_btree_get_block(bs, level, &ptr, &block, &bp);