Re: [PATCH 1/4] xfs: detect self referencing btree sibling pointers

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

 



On Tue, May 03, 2022 at 07:53:45AM -0700, Christoph Hellwig wrote:
> Looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> 
> One nit (with a few instances):
> 
> > +	if (level >= 0) {
> > +		if (!xfs_btree_check_lptr(cur, sibling, level + 1))
> > +			return __this_address;
> > +	} else if (!xfs_verify_fsbno(mp, sibling)) {
> > +		return __this_address;
> > +	}
> 
> Maybe it's just me, but I would find the non-condensed version a little
> easier to read for these kinds of checks:
> 
> 	if (level >= 0) {
> 		if (!xfs_btree_check_lptr(cur, sibling, level + 1))
> 			return __this_address;
> 	} else {
> 		if (!xfs_verify_fsbno(mp, sibling))
> 			return __this_address;
> 	}

Ok, I can do that.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[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