summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_dir2_leaf.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-08 15:05:37 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-10 16:54:23 -0800
commitfdbb8c5b805c19bc2764aa1b91952e75e4c1c086 (patch)
tree119a1d43177e2fb5a352ef542d2538597370fe6c /fs/xfs/libxfs/xfs_dir2_leaf.c
parent5c072127d31d3a605a3048dc5d3fdfc0cdd47212 (diff)
xfs: devirtualize ->data_entsize
Replace the ->data_entsize dir ops method with a directly called xfs_dir2_data_entsize helper that takes care of the differences between the directory format with and without the file type field. 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_leaf.c')
-rw-r--r--fs/xfs/libxfs/xfs_dir2_leaf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_leaf.c b/fs/xfs/libxfs/xfs_dir2_leaf.c
index bbbd7b96678a..dd7b4bd8ed61 100644
--- a/fs/xfs/libxfs/xfs_dir2_leaf.c
+++ b/fs/xfs/libxfs/xfs_dir2_leaf.c
@@ -660,7 +660,7 @@ xfs_dir2_leaf_addname(
xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
ents = leafhdr.ents;
bestsp = xfs_dir2_leaf_bests_p(ltp);
- length = dp->d_ops->data_entsize(args->namelen);
+ length = xfs_dir2_data_entsize(dp->i_mount, args->namelen);
/*
* See if there are any entries with the same hash value
@@ -1397,7 +1397,8 @@ xfs_dir2_leaf_removename(
*/
xfs_dir2_data_make_free(args, dbp,
(xfs_dir2_data_aoff_t)((char *)dep - (char *)hdr),
- dp->d_ops->data_entsize(dep->namelen), &needlog, &needscan);
+ xfs_dir2_data_entsize(dp->i_mount, dep->namelen), &needlog,
+ &needscan);
/*
* We just mark the leaf entry stale by putting a null in it.
*/