Re: [PATCH -next] mm: memcg: use meaningful error code for return value
From: Michal Hocko
Date: Mon May 06 2024 - 10:49:51 EST
On Mon 06-05-24 14:53:47, Matthew Wilcox wrote:
> On Mon, May 06, 2024 at 01:36:43PM +0000, Xiu Jianfeng wrote:
> > alloc_mem_cgroup_per_node_info() returns 1 if failed, use -ENOMEM
> > instead, which is more meaningful.
>
> This should probably be changed to return true/false instead of
> an int.
Agreed. Or change the only caller to consume the error. Changing to bool
seems like the easiest way.
--
Michal Hocko
SUSE Labs