[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1602527.1638883933@warthog.procyon.org.uk>
Date: Tue, 07 Dec 2021 13:32:13 +0000
From: David Howells <dhowells@...hat.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: dhowells@...hat.com, jack@...e.cz, jlayton@...nel.org,
linux-cachefs@...hat.com, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netfs: Fix lockdep warning from taking sb_writers whilst holding mmap_lock
Matthew Wilcox <willy@...radead.org> wrote:
> On Tue, Dec 07, 2021 at 11:19:35AM +0000, David Howells wrote:
> > Taking sb_writers whilst holding mmap_lock isn't allowed and will result in
> > a lockdep warning like that below. The problem comes from cachefiles
> > needing to take the sb_writers lock in order to do a write to the cache,
> > but being asked to do this by netfslib called from readpage, readahead or
> > write_begin[1].
>
> Isn't it taking sb_writers _on a different filesystem_? So there's not
> a real deadlock here, just a need to tell lockdep that this is a
> different subclass of lock?
Jann thinks it can be turned into a real deadlock. See the link I put in the
patch description:
> > Link: https://lore.kernel.org/r/20210922110420.GA21576@quack2.suse.cz/ [1]
David
Powered by blists - more mailing lists