[Devel] Re: [RFC][PATCH] flexible array implementation

Denys Vlasenko vda.linux at googlemail.com
Tue Jul 21 09:59:39 PDT 2009


On Tue, Jul 21, 2009 at 6:03 PM, Dave Hansen<dave at linux.vnet.ibm.com> wrote:
> +static inline struct flex_array_part *
> +__fa_get_part(struct flex_array *fa, int part_nr, gfp_t flags)
> +{
> +       struct flex_array_part *part = NULL;
> +       if (part_nr > __nr_part_ptrs())
> +               return NULL;
> +       part = fa->parts[part_nr];
> +       if (!part) {
> +               part = kmalloc(FLEX_ARRAY_PART_SIZE, flags);
> +               if (!part)
> +                       return NULL;
> +               fa->parts[part_nr] = part;
> +       }
> +       return part;
> +}

This is far too big to be an inline.

--
vda
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list