Re: [PATCH] ext2: Silence lockdep warning about reclaim under xattr_sem

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

 



On Mon 24-02-20 11:46:55, Christoph Hellwig wrote:
> On Mon, Feb 24, 2020 at 01:59:16PM +0100, Jan Kara wrote:
> > +	/*
> > +	 * We are the only ones holding inode reference. The xattr_sem should
> > + 	 * better be unlocked! We could as well just not acquire xattr_sem at
> > +	 * all but this makes the code more futureproof. OTOH we need trylock
> > +	 * here to avoid false-positive warning from lockdep about reclaim
> > +	 * circular dependency.
> > +	 */
> > +	if (WARN_ON(!down_write_trylock(&EXT2_I(inode)->xattr_sem)))
> > +		return;
> 
> Shouldn't this be a WARN_ON_ONCE?  Just in case the impossible happens
> that avoids spamming dmesg over and over.

Fair enough, I'll switch to WARN_ON_ONCE here. Thanks for the review.

								Honza

-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux