summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-12-15 10:03:35 -0800
committerDarrick J. Wong <djwong@kernel.org>2023-12-15 10:03:35 -0800
commit6b5d917780219d0d8f8e2cefefcb6f50987d0fa3 (patch)
tree66040ae8b60583ae49bf23022dbac49cb23eb333 /fs/xfs/scrub
parent576d30ecb620ae3bc156dfb2a4e91143e7f3256d (diff)
downloadlinux-stable-6b5d917780219d0d8f8e2cefefcb6f50987d0fa3.tar.gz
linux-stable-6b5d917780219d0d8f8e2cefefcb6f50987d0fa3.tar.bz2
linux-stable-6b5d917780219d0d8f8e2cefefcb6f50987d0fa3.zip
xfs: dont cast to char * for XFS_DFORK_*PTR macros
Code in the next patch will assign the return value of XFS_DFORK_*PTR macros to a struct pointer. gcc complains about casting char* strings to struct pointers, so let's fix the macro's cast to void* to shut up the warnings. While we're at it, fix one of the scrub tests that uses PTR to use BOFF instead for a simpler integer comparison, since other linters whine about char* and void* comparisons. Can't satisfy all these dman bots. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r--fs/xfs/scrub/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/scrub/inode.c b/fs/xfs/scrub/inode.c
index 6c40f3e020ea..a81f070b0cd2 100644
--- a/fs/xfs/scrub/inode.c
+++ b/fs/xfs/scrub/inode.c
@@ -556,7 +556,7 @@ xchk_dinode(
}
/* di_forkoff */
- if (XFS_DFORK_APTR(dip) >= (char *)dip + mp->m_sb.sb_inodesize)
+ if (XFS_DFORK_BOFF(dip) >= mp->m_sb.sb_inodesize)
xchk_ino_set_corrupt(sc, ino);
if (naextents != 0 && dip->di_forkoff == 0)
xchk_ino_set_corrupt(sc, ino);