Re: [PATCH] xfs: remove unreachable code

From: Christoph Hellwig
Date: Tue May 10 2022 - 05:33:50 EST


On Fri, May 06, 2022 at 09:04:02AM -0700, Darrick J. Wong wrote:
> > @@ -1765,7 +1765,6 @@ xfs_icwalk(
> > }
> > }
> > return last_error;
> > - BUILD_BUG_ON(XFS_ICWALK_PRIVATE_FLAGS & XFS_ICWALK_FLAGS_VALID);
>
> <cough> Do you know what you're removing?

That being said hiding this behind the return is rather odd. The
normal placement in most of the kernel is at the beginning of a
function.