summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub/dir.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-08 23:57:51 +0100
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-11 01:54:20 +0100
commit478c7835cb8ee28e73e732642866995f8555df7e (patch)
tree66f49ed8598c5bd29727a108996abf56f4c82c6a /fs/xfs/scrub/dir.c
parentxfs: move the dir2 leaf header size to struct xfs_da_geometry (diff)
downloadlinux-478c7835cb8ee28e73e732642866995f8555df7e.tar.xz
linux-478c7835cb8ee28e73e732642866995f8555df7e.zip
xfs: move the max dir2 leaf entries count to struct xfs_da_geometry
Move the max leaf entries count towards our structure for dir/attr geometry parameters. 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/dir.c')
-rw-r--r--fs/xfs/scrub/dir.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/scrub/dir.c b/fs/xfs/scrub/dir.c
index d8bb1ae4c5e3..9aa90ff45c3e 100644
--- a/fs/xfs/scrub/dir.c
+++ b/fs/xfs/scrub/dir.c
@@ -489,7 +489,6 @@ xchk_directory_leaf1_bestfree(
struct xfs_dir2_leaf *leaf;
struct xfs_buf *dbp;
struct xfs_buf *bp;
- const struct xfs_dir_ops *d_ops = sc->ip->d_ops;
struct xfs_da_geometry *geo = sc->mp->m_dir_geo;
__be16 *bestp;
__u16 best;
@@ -529,7 +528,7 @@ xchk_directory_leaf1_bestfree(
}
/* Is the leaf count even remotely sane? */
- if (leafhdr.count > d_ops->leaf_max_ents(geo)) {
+ if (leafhdr.count > geo->leaf_max_ents) {
xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, lblk);
goto out;
}