]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs: set btree block buffer ops in _init_buf
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Apr 2024 17:00:59 +0000 (10:00 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:37 +0000 (11:37 -0700)
Source kernel commit: ad065ef0d2fcd787225bd8887b6b75c6eb4da9a1

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@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/xfs_bmap.c
libxfs/xfs_btree.c

index a7b6c44f1cc50709dc1c1550289cdf5d1b13f5a7..b81f3e3da0499a55598924078de151deed4cc7f1 100644 (file)
@@ -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_bmbt_init_block(ip, ablock, abp, 0, 0);
 
index 2386084a531dff9640d880489ae21a68c4a67244..95041d626c4c92f0c1f96232c63fc78d1c68c20a 100644 (file)
@@ -1216,6 +1216,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