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

Christoph Hellwig
2022-05-03T14:53:47Z

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

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