From: David Howells <dhowells@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: dhowells@redhat.com, jack@suse.cz, jlayton@kernel.org,
linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] netfs: Fix lockdep warning from taking sb_writers whilst holding mmap_lock
Date: Tue, 07 Dec 2021 13:32:13 +0000 [thread overview]
Message-ID: <1602527.1638883933@warthog.procyon.org.uk> (raw)
In-Reply-To: <Ya9eDiFCE2fO7K/S@casper.infradead.org>
Matthew Wilcox <willy@infradead.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
prev parent reply other threads:[~2021-12-07 13:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 11:19 David Howells
2021-12-07 13:13 ` Matthew Wilcox
2021-12-07 13:32 ` David Howells [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1602527.1638883933@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=linux-cachefs@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®