]> git.baikalelectronics.ru Git - 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)
commit66529dae329105804950bfddc8cf20c502105606
treec72e5927a34957bf09dc4b177c334ad9e9570617
parentc24d746384317e85035a05511d5e70c2fba76ac1
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