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

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