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

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

 



On Tue, May 19, 2020 at 11:53:34PM -0700, Christoph Hellwig wrote:
> On Wed, May 20, 2020 at 07:48:39AM +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);
> 
> To stick to the theme of broken error handling I don't think this
> does what you think as this takes the address of each field, which
> will aways be >= 0.  I like the idea of the patch, though.

Ah, search and replace fail. I'll fix it.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[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