[PATCH 41/49] fs/xfs: Use vzalloc
Alex Elder
aelder at sgi.com
Fri Nov 5 12:09:45 CDT 2010
On Thu, 2010-11-04 at 20:08 -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe at perches.com>
> ---
> fs/xfs/linux-2.6/kmem.h | 7 +------
> 1 files changed, 1 insertions(+), 6 deletions(-)
>
> 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)
> {
Looks good to me.
Reviewed-by: Alex Elder <aelder at sgi.com>
More information about the xfs
mailing list