[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200225103244.GB29340@quack2.suse.cz>
Date: Tue, 25 Feb 2020 11:32:44 +0100
From: Jan Kara <jack@...e.cz>
To: Christoph Hellwig <hch@...radead.org>
Cc: Jan Kara <jack@...e.cz>, linux-ext4@...r.kernel.org,
"J. R. Okajima" <hooanon05g@...il.com>
Subject: Re: [PATCH] ext2: Silence lockdep warning about reclaim under
xattr_sem
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@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists