lkml.org 
[lkml]   [2018]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gfs2: add error handling for kmem_cache_zalloc
On 12 June 2018 at 09:24, cgxu519@gmx.com <cgxu519@gmx.com> wrote:
>
>> 在 2018年6月12日,上午11:38,Zhouyang Jia <jiazhouyang09@gmail.com> 写道:
>>
>> When kmem_cache_zalloc fails, the lack of error-handling code may
>> cause unexpected results.
>>
>> This patch adds error-handling code after calling kmem_cache_zalloc.
>
> Should not fail on this case.

Indeed, with the __GFP_NOFAIL flag, kmem_cache_zalloc will not fail.
This is documented in include/linux/gfp.h.

Thanks,
Andreas

\
 
 \ /
  Last update: 2018-06-12 10:24    [W:0.038 / U:17.900 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site