summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_da_format.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-08 14:58:05 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-10 16:54:21 -0800
commita84f3d5cb04f7dff1bf6904f0a05bc8df16137fb (patch)
tree99c8b71991efef1a63ad8102ad6d2d80795673bb /fs/xfs/libxfs/xfs_da_format.c
parent195b0a44ab73f0275683e7a0b1985751ea2ef6ae (diff)
xfs: add a bests pointer to struct xfs_dir3_icfree_hdr
All but two callers of the ->free_bests_p dir operation already have a struct xfs_dir3_icfree_hdr from a previous call to xfs_dir2_free_hdr_from_disk at hand. Add a pointer to the bests to struct xfs_dir3_icfree_hdr to clean up this pattern. To optimize this pattern, pass the struct xfs_dir3_icfree_hdr to xfs_dir2_free_log_bests instead of recalculating the pointer there. 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_da_format.c')
-rw-r--r--fs/xfs/libxfs/xfs_da_format.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/fs/xfs/libxfs/xfs_da_format.c b/fs/xfs/libxfs/xfs_da_format.c
index b943d9443d55..7263b6d6a135 100644
--- a/fs/xfs/libxfs/xfs_da_format.c
+++ b/fs/xfs/libxfs/xfs_da_format.c
@@ -411,12 +411,6 @@ xfs_dir2_free_max_bests(struct xfs_da_geometry *geo)
sizeof(xfs_dir2_data_off_t);
}
-static __be16 *
-xfs_dir2_free_bests_p(struct xfs_dir2_free *free)
-{
- return (__be16 *)((char *)free + sizeof(struct xfs_dir2_free_hdr));
-}
-
/*
* Convert data space db to the corresponding free db.
*/
@@ -443,12 +437,6 @@ xfs_dir3_free_max_bests(struct xfs_da_geometry *geo)
sizeof(xfs_dir2_data_off_t);
}
-static __be16 *
-xfs_dir3_free_bests_p(struct xfs_dir2_free *free)
-{
- return (__be16 *)((char *)free + sizeof(struct xfs_dir3_free_hdr));
-}
-
/*
* Convert data space db to the corresponding free db.
*/
@@ -500,7 +488,6 @@ static const struct xfs_dir_ops xfs_dir2_ops = {
.free_hdr_size = sizeof(struct xfs_dir2_free_hdr),
.free_max_bests = xfs_dir2_free_max_bests,
- .free_bests_p = xfs_dir2_free_bests_p,
.db_to_fdb = xfs_dir2_db_to_fdb,
.db_to_fdindex = xfs_dir2_db_to_fdindex,
};
@@ -537,7 +524,6 @@ static const struct xfs_dir_ops xfs_dir2_ftype_ops = {
.free_hdr_size = sizeof(struct xfs_dir2_free_hdr),
.free_max_bests = xfs_dir2_free_max_bests,
- .free_bests_p = xfs_dir2_free_bests_p,
.db_to_fdb = xfs_dir2_db_to_fdb,
.db_to_fdindex = xfs_dir2_db_to_fdindex,
};
@@ -574,7 +560,6 @@ static const struct xfs_dir_ops xfs_dir3_ops = {
.free_hdr_size = sizeof(struct xfs_dir3_free_hdr),
.free_max_bests = xfs_dir3_free_max_bests,
- .free_bests_p = xfs_dir3_free_bests_p,
.db_to_fdb = xfs_dir3_db_to_fdb,
.db_to_fdindex = xfs_dir3_db_to_fdindex,
};