Re: [PATCH 10/12] xfs: make xfs_*read_agf return EAGAIN to ALLOC_FLAG_TRYLOCK callers

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

 



On Fri, Jan 24, 2020 at 03:12:07PM -0800, Christoph Hellwig wrote:
> > +	/* We don't support trylock when freeing. */
> > +	ASSERT((flags & (XFS_ALLOC_FLAG_FREEING | XFS_ALLOC_FLAG_TRYLOCK)) !=
> > +			(XFS_ALLOC_FLAG_FREEING | XFS_ALLOC_FLAG_TRYLOCK));
> 
> Does this assert really work?  Shouldn't it be
> 
> 	ASSERT(!(flags & XFS_ALLOC_FLAG_FREEING) ||
> 	       !(flags & XFS_ALLOC_FLAG_TRYLOCK));

Actually, I'll take that back - your version is doing the right thing.
It just isn't quite as obvious to read.



[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