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 10:05:28PM -0800, Christoph Hellwig wrote:
> 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.

Will do.  Thanks for reviewing!

--D

> 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