From: Darrick J. Wong <djwong@xxxxxxxxxx> Set the btree block buffer ops in xfs_btree_init_buf since we already have access to that information through the btree ops. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- fs/xfs/libxfs/xfs_bmap.c | 1 - fs/xfs/libxfs/xfs_btree.c | 1 + fs/xfs/scrub/xfbtree.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 456f2559790b..875b1d9576ac 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -682,7 +682,6 @@ xfs_bmap_extents_to_btree( /* * Fill in the child block. */ - abp->b_ops = &xfs_bmbt_buf_ops; ablock = XFS_BUF_TO_BLOCK(abp); xfs_btree_init_buf(mp, abp, &xfs_bmbt_ops, 0, 0, ip->i_ino); diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c index 285dc609daa8..5af19610d891 100644 --- a/fs/xfs/libxfs/xfs_btree.c +++ b/fs/xfs/libxfs/xfs_btree.c @@ -1278,6 +1278,7 @@ xfs_btree_init_buf( { __xfs_btree_init_block(mp, XFS_BUF_TO_BLOCK(bp), ops, xfs_buf_daddr(bp), level, numrecs, owner); + bp->b_ops = ops->buf_ops; } void diff --git a/fs/xfs/scrub/xfbtree.c b/fs/xfs/scrub/xfbtree.c index e7975f462428..b5874e3f39da 100644 --- a/fs/xfs/scrub/xfbtree.c +++ b/fs/xfs/scrub/xfbtree.c @@ -415,7 +415,6 @@ xfbtree_init_leaf_block( trace_xfbtree_create_root_buf(xfbt, bp); - bp->b_ops = cfg->btree_ops->buf_ops; xfs_btree_init_buf(mp, bp, cfg->btree_ops, 0, 0, cfg->owner); error = xfs_bwrite(bp); xfs_buf_relse(bp);