On Tue, Dec 01, 2020 at 10:05:35AM +0000, Christoph Hellwig wrote: > On Mon, Nov 30, 2020 at 07:38:04PM -0800, Darrick J. Wong wrote: > > + if (!xfs_verify_ino(mp, rmap->me_owner) && > > + !XFS_RMAP_NON_INODE_OWNER(rmap->me_owner)) > > + return false; > > Wouldn't it make sense to reverse the order of the checks here? Yep. Fixed. > > + end = rmap->me_startblock + rmap->me_len - 1; > > + if (!xfs_verify_fsbno(mp, rmap->me_startblock) || > > + !xfs_verify_fsbno(mp, end)) > > return false; > > Nit: why not simply: > > if (!xfs_verify_fsbno(mp, rmap->me_startblock)) > return false; > if (!xfs_verify_fsbno(mp, rmap->me_startblock + rmap->me_len - 1)) > return false; > > ? Yeah. --D