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

Dave Chinner
2022-05-03T23:13:47Z

On Tue, May 03, 2022 at 03:53:14PM -0700, Darrick J. Wong wrote:
> On Mon, May 02, 2022 at 06:20:15PM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > To catch the obvious graph cycle problem and hence potential endless
> > looping.
> >
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > ---
> > fs/xfs/libxfs/xfs_btree.c | 137 ++++++++++++++++++++++++++++----------
> > 1 file changed, 102 insertions(+), 35 deletions(-)
> >
> > diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
> > index a8c79e760d8a..991fae6f500a 100644
> > --- a/fs/xfs/libxfs/xfs_btree.c
> > +++ b/fs/xfs/libxfs/xfs_btree.c
> > @@ -51,6 +51,50 @@ xfs_btree_magic(
> > return magic;
> > }
> >
> > +static xfs_failaddr_t
>
> Minor nit: static inline?

Not necessary - the compiler will do that automatically if
optimisations are turned on (as they always are). Modern compilers
are pretty aggressive at inlining code when they know there are no
other external references to the function.

> Reviewed-by: Darrick J. Wong <djwong@kernel.org>

Thanks!

-Dave.

--
Dave Chinner
david@fromorbit.com