Re: [PATCH 2/8] xfs: refactor the inode fork memory allocation functions

Christoph Hellwig
2024-12-13T06:05:28Z

On Thu, Dec 12, 2024 at 04:58:30PM -0800, Darrick J. Wong wrote:
> - ifp->if_broot = kmalloc(size,
> - GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL);
> - ASSERT(ifp->if_broot != NULL);
> + broot = xfs_broot_alloc(ifp, size);
> + ASSERT(broot != NULL);

Maybe use the chance to drop this somewhat silly assert? If a NOFAIL
allocation fails we're in deep trouble, and the NULL pointer dereference
a bit below will catch it anyway.

Otherwise looks good:

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