Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71716
b: refs/heads/master
c: 094262d
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Monakhov authored and Alasdair G Kergon committed Oct 20, 2007
1 parent bf4cd3b commit ce63bf0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 19 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: 6f3c3f0afa50782dc1742c968646c491657d255a
refs/heads/master: 094262db9e4c615e0db7a7b924d244b7a6c186b0
6 changes: 2 additions & 4 deletions trunk/drivers/md/dm-emc.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,10 @@ static void emc_pg_init(struct hw_handler *hwh, unsigned bypassed,

static struct emc_handler *alloc_emc_handler(void)
{
struct emc_handler *h = kmalloc(sizeof(*h), GFP_KERNEL);
struct emc_handler *h = kzalloc(sizeof(*h), GFP_KERNEL);

if (h) {
memset(h, 0, sizeof(*h));
if (h)
spin_lock_init(&h->lock);
}

return h;
}
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/md/dm-hw-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,10 @@ void dm_put_hw_handler(struct hw_handler_type *hwht)

static struct hwh_internal *_alloc_hw_handler(struct hw_handler_type *hwht)
{
struct hwh_internal *hwhi = kmalloc(sizeof(*hwhi), GFP_KERNEL);
struct hwh_internal *hwhi = kzalloc(sizeof(*hwhi), GFP_KERNEL);

if (hwhi) {
memset(hwhi, 0, sizeof(*hwhi));
if (hwhi)
hwhi->hwht = *hwht;
}

return hwhi;
}
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/md/dm-path-selector.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,10 @@ void dm_put_path_selector(struct path_selector_type *pst)

static struct ps_internal *_alloc_path_selector(struct path_selector_type *pst)
{
struct ps_internal *psi = kmalloc(sizeof(*psi), GFP_KERNEL);
struct ps_internal *psi = kzalloc(sizeof(*psi), GFP_KERNEL);

if (psi) {
memset(psi, 0, sizeof(*psi));
if (psi)
psi->pst = *pst;
}

return psi;
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,11 @@ static int alloc_targets(struct dm_table *t, unsigned int num)
int dm_table_create(struct dm_table **result, int mode,
unsigned num_targets, struct mapped_device *md)
{
struct dm_table *t = kmalloc(sizeof(*t), GFP_KERNEL);
struct dm_table *t = kzalloc(sizeof(*t), GFP_KERNEL);

if (!t)
return -ENOMEM;

memset(t, 0, sizeof(*t));
INIT_LIST_HEAD(&t->devices);
atomic_set(&t->holders, 1);

Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/md/dm-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,10 @@ void dm_put_target_type(struct target_type *t)

static struct tt_internal *alloc_target(struct target_type *t)
{
struct tt_internal *ti = kmalloc(sizeof(*ti), GFP_KERNEL);
struct tt_internal *ti = kzalloc(sizeof(*ti), GFP_KERNEL);

if (ti) {
memset(ti, 0, sizeof(*ti));
if (ti)
ti->tt = *t;
}

return ti;
}
Expand Down

0 comments on commit ce63bf0

Please sign in to comment.