Re: [PATCH 1/2 V2] xfs: gut error handling in xfs_trans_unreserve_and_mod_sb()

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

 



On Wed, May 20, 2020 at 12:48:05AM -0700, Christoph Hellwig wrote:
> On Wed, May 20, 2020 at 05:33:58PM +1000, Dave Chinner wrote:
> > +	/*
> > +	 * Debug checks outside of the spinlock so they don't lock up the
> > +	 * machine if they fail.
> > +	 */
> > +	ASSERT(mp->m_sb.sb_frextents >= 0);
> > +	ASSERT(mp->m_sb.sb_dblocks >= 0);
> > +	ASSERT(mp->m_sb.sb_agcount >= 0);
> > +	ASSERT(mp->m_sb.sb_imax_pct >= 0);
> > +	ASSERT(mp->m_sb.sb_rextsize >= 0);
> > +	ASSERT(mp->m_sb.sb_rbmblocks >= 0);
> > +	ASSERT(mp->m_sb.sb_rblocks >= 0);
> > +	ASSERT(mp->m_sb.sb_rextents >= 0);
> > +	ASSERT(mp->m_sb.sb_rextslog >= 0);

Except for imax_pct and rextslog, all of these are unsigned quantities,
right?  So the asserts will /never/ trigger?

--D

> >  	return;
> 
> No need for the return here at the end of the function.
> 
> 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