diff options
author | Christoph Hellwig | 2019-11-08 15:05:36 -0800 |
---|---|---|
committer | Darrick J. Wong | 2019-11-10 16:54:23 -0800 |
commit | 5c072127d31d3a605a3048dc5d3fdfc0cdd47212 (patch) | |
tree | 752dfc64d8b68b1305cb474fdfa81124172085ec /fs/xfs/scrub | |
parent | 9eedae10899af882f3d34dc49c89d3220cd145f6 (diff) |
xfs: replace xfs_dir3_data_endp with xfs_dir3_data_end_offset
All the callers really want an offset into the buffer, so adopt
the helper to return that instead.
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/scrub/dir.c b/fs/xfs/scrub/dir.c index f07f6882877d..71967ca67302 100644 --- a/fs/xfs/scrub/dir.c +++ b/fs/xfs/scrub/dir.c @@ -190,7 +190,7 @@ xchk_dir_rec( struct xfs_dir2_data_entry *dent; struct xfs_buf *bp; struct xfs_dir2_leaf_entry *ent; - void *endp; + unsigned int end; unsigned int iter_off; xfs_ino_t ino; xfs_dablk_t rec_bno; @@ -245,8 +245,8 @@ xchk_dir_rec( /* Make sure we got a real directory entry. */ iter_off = mp->m_dir_inode_ops->data_entry_offset; - endp = xfs_dir3_data_endp(mp->m_dir_geo, bp->b_addr); - if (!endp) { + end = xfs_dir3_data_end_offset(mp->m_dir_geo, bp->b_addr); + if (!end) { xchk_fblock_set_corrupt(ds->sc, XFS_DATA_FORK, rec_bno); goto out_relse; } @@ -254,7 +254,7 @@ xchk_dir_rec( struct xfs_dir2_data_entry *dep = bp->b_addr + iter_off; struct xfs_dir2_data_unused *dup = bp->b_addr + iter_off; - if (iter_off >= endp - bp->b_addr) { + if (iter_off >= end) { xchk_fblock_set_corrupt(ds->sc, XFS_DATA_FORK, rec_bno); goto out_relse; } @@ -393,7 +393,7 @@ xchk_directory_data_bestfree( /* Make sure the bestfrees are actually the best free spaces. */ offset = d_ops->data_entry_offset; - end = xfs_dir3_data_endp(mp->m_dir_geo, bp->b_addr) - bp->b_addr; + end = xfs_dir3_data_end_offset(mp->m_dir_geo, bp->b_addr); /* Iterate the entries, stopping when we hit or go past the end. */ while (offset < end) { |