Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262189
b: refs/heads/master
c: e29e65a
h: refs/heads/master
i:
  262187: 0b5b637
v: v3
  • Loading branch information
Joe Perches authored and Alasdair G Kergon committed Aug 2, 2011
1 parent dcb63ad commit 09bdec8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c9b27ab08aaf46426515b8b858ad9c60731c7a1
refs/heads/master: e29e65aacbd9e628378084905cbcf62a9fa4a8cc
3 changes: 1 addition & 2 deletions trunk/drivers/md/dm-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ static int create_log_context(struct dm_dirty_log *log, struct dm_target *ti,
memset(lc->sync_bits, (sync == NOSYNC) ? -1 : 0, bitset_size);
lc->sync_count = (sync == NOSYNC) ? region_count : 0;

lc->recovering_bits = vmalloc(bitset_size);
lc->recovering_bits = vzalloc(bitset_size);
if (!lc->recovering_bits) {
DMWARN("couldn't allocate sync bitset");
vfree(lc->sync_bits);
Expand All @@ -504,7 +504,6 @@ static int create_log_context(struct dm_dirty_log *log, struct dm_target *ti,
kfree(lc);
return -ENOMEM;
}
memset(lc->recovering_bits, 0, bitset_size);
lc->sync_search = 0;
log->context = lc;

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/md/dm-snap-persistent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 09bdec8

Please sign in to comment.