linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: gouhao@uniontech.com
To: willy@infradead.org
Cc: brauner@kernel.org, gouhao@uniontech.com,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	viro@zeniv.linux.org.uk
Subject: Re: [PATCH] fs/buffer: adjust the order of might_sleep() in __getblk_gfp()
Date: Fri, 24 Mar 2023 09:52:01 +0800	[thread overview]
Message-ID: <20230324015201.12511-1-gouhao@uniontech.com> (raw)
In-Reply-To: <ZBxExR3/4bphAUpF@casper.infradead.org>

>On Thu, Mar 23, 2023 at 05:37:52PM +0800, gouhao@uniontech.com wrote:
>> From: Gou Hao <gouhao@uniontech.com>
>> 
>> If 'bh' is found in cache, just return directly.
>> might_sleep() is only required on slow paths.
>
>You're missing the point.  The caller can't know whether the slow or
>fast path will be taken.  So it must _never_ call this function if it
>cannot sleep.
I see. Thank you for your explanation! :)

      reply	other threads:[~2023-03-24  1:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23  9:37 [PATCH] fs/buffer: adjust the order of might_sleep() in __getblk_gfp() gouhao
2023-03-23 12:23 ` Matthew Wilcox
2023-03-24  1:52   ` gouhao [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=20230324015201.12511-1-gouhao@uniontech.com \
    --to=gouhao@uniontech.com \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --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).