aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_bmap_btree.c
diff options
context:
space:
mode:
authorGravatar Christoph Hellwig <hch@lst.de> 2024-02-22 12:37:35 -0800
committerGravatar Darrick J. Wong <djwong@kernel.org> 2024-02-22 12:37:35 -0800
commit2b9e7f2668c540f18afd66a053ea78f3a629f8e2 (patch)
tree82783e887865249ddc18632303bdf30c6047e9b4 /fs/xfs/libxfs/xfs_bmap_btree.c
parentxfs: add a xfs_btree_init_ptr_from_cur (diff)
downloadlinux-2b9e7f2668c540f18afd66a053ea78f3a629f8e2.tar.gz
linux-2b9e7f2668c540f18afd66a053ea78f3a629f8e2.tar.bz2
linux-2b9e7f2668c540f18afd66a053ea78f3a629f8e2.zip
xfs: don't override bc_ops for staging btrees
Add a few conditionals for staging btrees to the core btree code instead of overloading the bc_ops vector. 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/libxfs/xfs_bmap_btree.c')
-rw-r--r--fs/xfs/libxfs/xfs_bmap_btree.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap_btree.c b/fs/xfs/libxfs/xfs_bmap_btree.c
index 726cb506bbbf..ec0b970157ae 100644
--- a/fs/xfs/libxfs/xfs_bmap_btree.c
+++ b/fs/xfs/libxfs/xfs_bmap_btree.c
@@ -609,7 +609,6 @@ xfs_bmbt_stage_cursor(
struct xbtree_ifakeroot *ifake)
{
struct xfs_btree_cur *cur;
- struct xfs_btree_ops *ops;
/* data fork always has larger maxheight */
cur = xfs_bmbt_init_common(mp, NULL, ip, XFS_DATA_FORK);
@@ -618,8 +617,7 @@ xfs_bmbt_stage_cursor(
/* Don't let anyone think we're attached to the real fork yet. */
cur->bc_ino.whichfork = -1;
- xfs_btree_stage_ifakeroot(cur, ifake, &ops);
- ops->update_cursor = NULL;
+ xfs_btree_stage_ifakeroot(cur, ifake);
return cur;
}
@@ -663,7 +661,7 @@ xfs_bmbt_commit_staged_btree(
break;
}
xfs_trans_log_inode(tp, cur->bc_ino.ip, flags);
- xfs_btree_commit_ifakeroot(cur, tp, whichfork, &xfs_bmbt_ops);
+ xfs_btree_commit_ifakeroot(cur, tp, whichfork);
}
/*