aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/scrub
diff options
context:
space:
mode:
authorChristoph Hellwig2019-11-08 15:05:37 -0800
committerDarrick J. Wong2019-11-10 16:54:23 -0800
commitfdbb8c5b805c19bc2764aa1b91952e75e4c1c086 (patch)
tree119a1d43177e2fb5a352ef542d2538597370fe6c /fs/xfs/scrub
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/scrub')
-rw-r--r--fs/xfs/scrub/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/scrub/dir.c b/fs/xfs/scrub/dir.c
index 71967ca67302..5347c18745d3 100644
--- a/fs/xfs/scrub/dir.c
+++ b/fs/xfs/scrub/dir.c
@@ -265,7 +265,7 @@ xchk_dir_rec(
}
if (dep == dent)
break;
- iter_off += mp->m_dir_inode_ops->data_entsize(dep->namelen);
+ iter_off += xfs_dir2_data_entsize(mp, dep->namelen);
}
/* Retrieve the entry, sanity check it, and compare hashes. */
@@ -403,7 +403,7 @@ xchk_directory_data_bestfree(
if (dup->freetag != cpu_to_be16(XFS_DIR2_DATA_FREE_TAG)) {
struct xfs_dir2_data_entry *dep = bp->b_addr + offset;
- newlen = d_ops->data_entsize(dep->namelen);
+ newlen = xfs_dir2_data_entsize(mp, dep->namelen);
if (newlen <= 0) {
xchk_fblock_set_corrupt(sc, XFS_DATA_FORK,
lblk);