Re: [RFC PATCH 1/2] xfs: free the item in xfs_mru_cache_insert on failure

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

 



On Mon, May 05, 2025 at 07:45:49AM +0200, hch wrote:
> On Fri, May 02, 2025 at 01:06:46PM -0700, Darrick J. Wong wrote:
> > >  	atomic_inc(&pag_group(args->pag)->xg_active_ref);
> > >  	item->pag = args->pag;
> > > -	error = xfs_mru_cache_insert(mp->m_filestream, pino, &item->mru);
> > > -	if (error)
> > > -		goto out_free_item;
> > > +	xfs_mru_cache_insert(mp->m_filestream, pino, &item->mru);
> > 
> > Hmm, don't you still need to check for -ENOMEM returns?  Or if truly
> > none of the callers care anymore, then can we get rid of the return
> > value for xfs_mru_cache_insert?
> 
> Both for file streams and the zone association in the next patch the
> mru cache is just a hint, so we ignore all errors (see the return 0
> in the error handling boilerplate in the existing code).  But hardcoding
> that assumption into the core mru cache helpers seems a bit weird.

Ok then.  The comment change in this patch is a reasonable explanation
for why the return value is/has always been ignored, so

Reviewed-by: "Darrick J. Wong" <djwong@xxxxxxxxxx>

--D




[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