[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBxExR3/4bphAUpF@casper.infradead.org>
Date: Thu, 23 Mar 2023 12:23:33 +0000
From: Matthew Wilcox <willy@...radead.org>
To: gouhao@...ontech.com
Cc: viro@...iv.linux.org.uk, brauner@...nel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs/buffer: adjust the order of might_sleep() in
__getblk_gfp()
On Thu, Mar 23, 2023 at 05:37:52PM +0800, gouhao@...ontech.com wrote:
> From: Gou Hao <gouhao@...ontech.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.
Powered by blists - more mailing lists