diff options
author | Christoph Hellwig <hch@lst.de> | 2019-11-09 02:05:39 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-11 03:54:24 +0300 |
commit | 1848b607a9ad084db0180118304b9af2be68384e (patch) | |
tree | 3e828c91d1b0a7295076088a00a7b2a27107c089 /fs/xfs/libxfs/xfs_dir2_node.c | |
parent | 711c7dbf5fdafdbb2fb906b38cefb113bfdd4a79 (diff) | |
download | linux-1848b607a9ad084db0180118304b9af2be68384e.tar.xz |
xfs: devirtualize ->data_bestfree_p
Replace the ->data_bestfree_p dir ops method with a directly called
xfs_dir2_data_bestfree_p helper that takes care of the differences
between the v4 and v5 on-disk format.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2_node.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2_node.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_node.c b/fs/xfs/libxfs/xfs_dir2_node.c index 80659d009cba..76d19b522e92 100644 --- a/fs/xfs/libxfs/xfs_dir2_node.c +++ b/fs/xfs/libxfs/xfs_dir2_node.c @@ -1317,7 +1317,7 @@ xfs_dir2_leafn_remove( dbp = dblk->bp; hdr = dbp->b_addr; dep = (xfs_dir2_data_entry_t *)((char *)hdr + off); - bf = dp->d_ops->data_bestfree_p(hdr); + bf = xfs_dir2_data_bestfree_p(dp->i_mount, hdr); longest = be16_to_cpu(bf[0].length); needlog = needscan = 0; xfs_dir2_data_make_free(args, dbp, off, @@ -1775,7 +1775,7 @@ xfs_dir2_node_add_datablk( } /* Update the freespace value for the new block in the table. */ - bf = dp->d_ops->data_bestfree_p(dbp->b_addr); + bf = xfs_dir2_data_bestfree_p(mp, dbp->b_addr); hdr->bests[*findex] = bf[0].length; *dbpp = dbp; @@ -1948,7 +1948,7 @@ xfs_dir2_node_addname_int( /* setup for data block up now */ hdr = dbp->b_addr; - bf = dp->d_ops->data_bestfree_p(hdr); + bf = xfs_dir2_data_bestfree_p(dp->i_mount, hdr); ASSERT(be16_to_cpu(bf[0].length) >= length); /* Point to the existing unused space. */ |