summaryrefslogtreecommitdiff
path: root/drivers/md/dm-snap-persistent.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-08-02 12:32:02 +0100
committerAlasdair G Kergon <agk@redhat.com>2011-08-02 12:32:02 +0100
commite29e65aacbd9e628378084905cbcf62a9fa4a8cc (patch)
tree279e6e87d60da82c082833205c996d7046b1a46d /drivers/md/dm-snap-persistent.c
parent6c9b27ab08aaf46426515b8b858ad9c60731c7a1 (diff)
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>
Diffstat (limited to 'drivers/md/dm-snap-persistent.c')
-rw-r--r--drivers/md/dm-snap-persistent.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c
index 39becbec4dfe..1a0acb8abdf6 100644
--- a/drivers/md/dm-snap-persistent.c
+++ b/drivers/md/dm-snap-persistent.c
@@ -174,10 +174,9 @@ static int alloc_area(struct pstore *ps)
if (!ps->area)
goto err_area;
- ps->zero_area = vmalloc(len);
+ ps->zero_area = vzalloc(len);
if (!ps->zero_area)
goto err_zero_area;
- memset(ps->zero_area, 0, len);
ps->header_area = vmalloc(len);
if (!ps->header_area)