Re: [PATCH 04/10] xfs: improve the code that checks recovered rmap intent items

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

> +	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;

?



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux