dm: use vzalloc

Use vzalloc() instead of vmalloc()+memset().

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
Joe Perches
2011-08-02 12:32:02 +01:00
committed by Alasdair G Kergon
parent 6c9b27ab08
commit e29e65aacb
3 changed files with 3 additions and 7 deletions

View File

@@ -153,9 +153,7 @@ void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size)
return NULL;
size = nmemb * elem_size;
addr = vmalloc(size);
if (addr)
memset(addr, 0, size);
addr = vzalloc(size);
return addr;
}