public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: dhowells@redhat.com, xiubli@redhat.com, idryomov@gmail.com,
	vshankar@redhat.com, linux-kernel@vger.kernel.org,
	ceph-devel@vger.kernel.org, willy@infradead.org,
	keescook@chromium.org, linux-fsdevel@vger.kernel.org,
	linux-cachefs@redhat.com
Subject: Re: [PATCH 1/2] netfs: release the folio lock and put the folio before retrying
Date: Tue, 05 Jul 2022 14:21:24 +0100	[thread overview]
Message-ID: <2187946.1657027284@warthog.procyon.org.uk> (raw)
In-Reply-To: <30a4bd0e19626f5fb30f19f0ae70fba2debb361a.camel@kernel.org>

Jeff Layton <jlayton@kernel.org> wrote:

> I don't know here... I think it might be better to just expect that when
> this function returns an error that the folio has already been unlocked.
> Doing it this way will mean that you will lock and unlock the folio a
> second time for no reason.

I seem to remember there was some reason you wanted the folio unlocking and
putting.  I guess you need to drop the ref to flush it.

Would it make sense for ->check_write_begin() to be passed a "struct folio
**folio" rather than "struct folio *folio" and then the filesystem can clear
*folio if it disposes of the page?

David


  parent reply	other threads:[~2022-07-05 13:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01  2:29 [PATCH 0/2] netfs, ceph: fix the crash when unlocking the folio xiubli
2022-07-01  2:29 ` [PATCH 1/2] netfs: release the folio lock and put the folio before retrying xiubli
2022-07-01 10:38   ` Jeff Layton
2022-07-04  1:13     ` Xiubo Li
2022-07-04  2:10       ` Matthew Wilcox
2022-07-04  2:40         ` Xiubo Li
2022-07-04  6:58     ` Xiubo Li
2022-07-05 13:21     ` David Howells [this message]
2022-07-05 13:41       ` Jeff Layton
2022-07-06  0:58       ` Xiubo Li
2022-07-01  2:29 ` [PATCH 2/2] ceph: do not release the folio lock in kceph xiubli

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=2187946.1657027284@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vshankar@redhat.com \
    --cc=willy@infradead.org \
    --cc=xiubli@redhat.com \
    /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