Re: [TRIVIAL PATCH next 14/15] mm: Convert vmalloc/memset to vzalloc

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

 



On Sat, May 28, 2011 at 10:36 AM, Joe Perches <joe@xxxxxxxxxxx> wrote:
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>

Acked-by: Paul Menage <menage@xxxxxxxxxx>

> ---
>  mm/page_cgroup.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
> index 74ccff6..dbb28fd 100644
> --- a/mm/page_cgroup.c
> +++ b/mm/page_cgroup.c
> @@ -478,11 +478,10 @@ int swap_cgroup_swapon(int type, unsigned long max_pages)
>        length = DIV_ROUND_UP(max_pages, SC_PER_PAGE);
>        array_size = length * sizeof(void *);
>
> -       array = vmalloc(array_size);
> +       array = vzalloc(array_size);
>        if (!array)
>                goto nomem;
>
> -       memset(array, 0, array_size);
>        ctrl = &swap_cgroup_ctrl[type];
>        mutex_lock(&swap_cgroup_mutex);
>        ctrl->length = length;
> --
> 1.7.5.rc3.dirty
>
>
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers



[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux