summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_da_format.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-08 14:57:50 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-10 16:54:20 -0800
commit787b0893ad1e315ea014dc3f0e01a5bc9236c623 (patch)
tree9d34da0e716799fb0ae26e576813f536ec7e2b82 /fs/xfs/libxfs/xfs_da_format.c
parent163fbbb3568b6acf762449b8aa7713c764cf860a (diff)
downloadlinux-787b0893ad1e315ea014dc3f0e01a5bc9236c623.tar.gz
linux-787b0893ad1e315ea014dc3f0e01a5bc9236c623.tar.bz2
linux-787b0893ad1e315ea014dc3f0e01a5bc9236c623.zip
xfs: add an entries pointer to struct xfs_dir3_icleaf_hdr
All callers of the ->node_tree_p dir operation already have a struct xfs_dir3_icleaf_hdr from a previous call to xfs_da_leaf_hdr_from_disk at hand, or just need slight changes to the calling conventions to do so. Add a pointer to the entries to struct xfs_dir3_icleaf_hdr to clean up this pattern. To make this possible the xfs_dir3_leaf_log_ents function grow a new argument to pass the xfs_dir3_icleaf_hdr that call callers already have, and xfs_dir2_leaf_lookup_int returns the xfs_dir3_icleaf_hdr to the callers so that they can later use it. 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 193708d12459..ed21ce01502f 100644
--- a/fs/xfs/libxfs/xfs_da_format.c
+++ b/fs/xfs/libxfs/xfs_da_format.c
@@ -411,12 +411,6 @@ xfs_dir2_max_leaf_ents(struct xfs_da_geometry *geo)
(uint)sizeof(struct xfs_dir2_leaf_entry);
}
-static struct xfs_dir2_leaf_entry *
-xfs_dir2_leaf_ents_p(struct xfs_dir2_leaf *lp)
-{
- return lp->__ents;
-}
-
static int
xfs_dir3_max_leaf_ents(struct xfs_da_geometry *geo)
{
@@ -424,12 +418,6 @@ xfs_dir3_max_leaf_ents(struct xfs_da_geometry *geo)
(uint)sizeof(struct xfs_dir2_leaf_entry);
}
-static struct xfs_dir2_leaf_entry *
-xfs_dir3_leaf_ents_p(struct xfs_dir2_leaf *lp)
-{
- return ((struct xfs_dir3_leaf *)lp)->__ents;
-}
-
/*
* Directory free space block operations
*/
@@ -584,7 +572,6 @@ static const struct xfs_dir_ops xfs_dir2_ops = {
.leaf_hdr_size = sizeof(struct xfs_dir2_leaf_hdr),
.leaf_max_ents = xfs_dir2_max_leaf_ents,
- .leaf_ents_p = xfs_dir2_leaf_ents_p,
.free_hdr_size = sizeof(struct xfs_dir2_free_hdr),
.free_hdr_to_disk = xfs_dir2_free_hdr_to_disk,
@@ -627,7 +614,6 @@ static const struct xfs_dir_ops xfs_dir2_ftype_ops = {
.leaf_hdr_size = sizeof(struct xfs_dir2_leaf_hdr),
.leaf_max_ents = xfs_dir2_max_leaf_ents,
- .leaf_ents_p = xfs_dir2_leaf_ents_p,
.free_hdr_size = sizeof(struct xfs_dir2_free_hdr),
.free_hdr_to_disk = xfs_dir2_free_hdr_to_disk,
@@ -670,7 +656,6 @@ static const struct xfs_dir_ops xfs_dir3_ops = {
.leaf_hdr_size = sizeof(struct xfs_dir3_leaf_hdr),
.leaf_max_ents = xfs_dir3_max_leaf_ents,
- .leaf_ents_p = xfs_dir3_leaf_ents_p,
.free_hdr_size = sizeof(struct xfs_dir3_free_hdr),
.free_hdr_to_disk = xfs_dir3_free_hdr_to_disk,