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

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

 



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@xxxxxx>





[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