aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub/dir.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-08 15:05:36 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-10 16:54:23 -0800
commit5c072127d31d3a605a3048dc5d3fdfc0cdd47212 (patch)
tree752dfc64d8b68b1305cb474fdfa81124172085ec /fs/xfs/scrub/dir.c
parentxfs: remove the now unused ->data_entry_p method (diff)
downloadlinux-dev-5c072127d31d3a605a3048dc5d3fdfc0cdd47212.tar.xz
linux-dev-5c072127d31d3a605a3048dc5d3fdfc0cdd47212.zip
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/dir.c')
-rw-r--r--fs/xfs/scrub/dir.c10
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) {