From: Christoph Hellwig <hch@infradead.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org
Subject: Re: Why does mpage_writepage() not handle locked buffers?
Date: Fri, 15 Dec 2023 02:49:55 -0800 [thread overview]
Message-ID: <ZXwvU2CXEeqxSDgA@infradead.org> (raw)
In-Reply-To: <ZXvnmfXG4xN8BQxI@casper.infradead.org>
On Fri, Dec 15, 2023 at 05:43:53AM +0000, Matthew Wilcox wrote:
> block_write_full_page() handles this fine, so why isn't this
>
> if (buffer_locked(bh))
> goto confused;
>
> Is the thought that we hold the folio locked, therefore no buffers
> should be locked at this time? I don't know the rules.
That would be my guess. For writeback on the fs mapping no one
else should ever have locked the buffer. For the bdev mapping
buffer locking isn't completely controlled by the bdevfs, but also
by any mounted fs using the buffer cache. So from my POV your
above change should be ok, but it'll need a big fat comment so
that the next person seeing it in 20 years isn't as confused as
you are now :)
next prev parent reply other threads:[~2023-12-15 10:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 5:43 Why does mpage_writepage() not handle locked buffers? Matthew Wilcox
2023-12-15 10:49 ` Christoph Hellwig [this message]
2023-12-15 17:21 ` Matthew Wilcox
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=ZXwvU2CXEeqxSDgA@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).