xfs
[Top] [All Lists]

Re: [TRIVIAL PATCH next 13/15] fs: Convert vmalloc/memset to vzalloc

To: Joe Perches <joe@xxxxxxxxxxx>
Subject: Re: [TRIVIAL PATCH next 13/15] fs: Convert vmalloc/memset to vzalloc
From: Alex Elder <aelder@xxxxxxx>
Date: Tue, 31 May 2011 13:20:39 -0500
Cc: Jan Harkes <jaharkes@xxxxxxxxxx>, <coda@xxxxxxxxxx>, Jiri Kosina <trivial@xxxxxxxxxx>, <xfs-masters@xxxxxxxxxxx>, <codalist@xxxxxxxxxxxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <reiserfs-devel@xxxxxxxxxxxxxxx>, <xfs@xxxxxxxxxxx>
In-reply-to: <4561db676a209fff984a75ade2f552ddbfabb95b.1306603968.git.joe@xxxxxxxxxxx>
References: <cover.1306603968.git.joe@xxxxxxxxxxx> <4561db676a209fff984a75ade2f552ddbfabb95b.1306603968.git.joe@xxxxxxxxxxx>
Reply-to: <aelder@xxxxxxx>
On Sat, 2011-05-28 at 10:36 -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
> ---
>  fs/coda/coda_linux.h    |    5 ++---
>  fs/reiserfs/journal.c   |    9 +++------
>  fs/reiserfs/resize.c    |    4 +---
>  fs/xfs/linux-2.6/kmem.h |    7 +------
>  4 files changed, 7 insertions(+), 18 deletions(-)
> 

Acked-by: Alex Elder <aelder@xxxxxxx>

. . .

> diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h
> index f7c8f7a..292eff1 100644
> --- a/fs/xfs/linux-2.6/kmem.h
> +++ b/fs/xfs/linux-2.6/kmem.h
> @@ -61,12 +61,7 @@ extern void  kmem_free(const void *);
>  
>  static inline void *kmem_zalloc_large(size_t size)
>  {
> -     void *ptr;
> -
> -     ptr = vmalloc(size);
> -     if (ptr)
> -             memset(ptr, 0, size);
> -     return ptr;
> +     return vzalloc(size);
>  }
>  static inline void kmem_free_large(void *ptr)
>  {



<Prev in Thread] Current Thread [Next in Thread>