Re: [PATCH] mm, memcg: fix error return value of mem_cgroup_alloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 6, 2020 at 10:11 PM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> On Mon, Apr 06, 2020 at 10:09:55PM +0800, Yafang Shao wrote:
> > What about ida_alloc_range() ? Should we correct it as well ?
> >
> >
> > * Return: The allocated ID, or %-ENOMEM if memory could not be allocated,
> > * or %-ENOSPC if there are no free IDs.
> > */
> > int ida_alloc_range(struct ida *ida, unsigned int min, unsigned int max,
> >                         gfp_t gfp)
> >
> > If there're no free IDs, ida_alloc_range() also returns ENOSPC.
>
> Do you want to check all the callers of ida_.*alloc()?

Sorry, I can't your point.

I just find the mem_cgroup_css_alloc() will use ida too.
mem_cgroup_css_alloc
    memcg_online_kmem
        memcg_alloc_cache_id
             ida_simple_get

I think we should keep the behavior consistent here.

Thanks
Yafang




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux