lkml.org 
[lkml]   [2023]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs/buffer: adjust the order of might_sleep() in __getblk_gfp()
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.

\
 
 \ /
  Last update: 2023-03-27 01:14    [W:0.028 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site