]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
xfs: clean up xchk_bmap_check_rmaps usage of XFS_IFORK_Q
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 16 May 2020 17:19:29 +0000 (10:19 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 19 May 2020 16:40:58 +0000 (09:40 -0700)
commit5fd68bdb5a87c929fff5f7bbd947034368f36f4f
treec72e5927a34957bf09dc4b177c334ad9e9570617
parent4b516ff4e772993a99fc9bf36503d23ce5bd5ba9
xfs: clean up xchk_bmap_check_rmaps usage of XFS_IFORK_Q

XFS_IFORK_Q is supposed to be a predicate, not a function returning a
value.  Its usage is in xchk_bmap_check_rmaps is incorrect, but that
function only cares about whether or not the "size" of the data is zero
or not.  Convert that logic to use a proper boolean, and teach the
caller to skip the call entirely if the end result would be that we'd do
nothing anyway.  This avoids a crash later in this series.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
[hch: generalized the NULL ifor check]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/scrub/bmap.c