Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758279Ab1EaTr6 (ORCPT ); Tue, 31 May 2011 15:47:58 -0400 Received: from smtp-out.google.com ([216.239.44.51]:22801 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758256Ab1EaTrw convert rfc822-to-8bit (ORCPT ); Tue, 31 May 2011 15:47:52 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=FhAlbqL+idlABn3skGM6iIBTniuoLw0P9O4gEvQSky4H0iwFznfSZ1fntePRHSnJ/3 D4wN7NQckVpMg4mixv+w== MIME-Version: 1.0 In-Reply-To: References: From: Paul Menage Date: Tue, 31 May 2011 12:47:27 -0700 Message-ID: Subject: Re: [TRIVIAL PATCH next 14/15] mm: Convert vmalloc/memset to vzalloc To: Joe Perches Cc: Balbir Singh , Daisuke Nishimura , KAMEZAWA Hiroyuki , Li Zefan , Jiri Kosina , "linux-mm@kvack.org" , Linux Containers , LKML Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1129 Lines: 35 On Sat, May 28, 2011 at 10:36 AM, Joe Perches wrote: > Signed-off-by: Joe Perches Acked-by: Paul Menage > --- > ?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 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/