Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2599
b: refs/heads/master
c: 990a8ba
h: refs/heads/master
i:
  2597: 1fb79ad
  2595: b30770c
  2591: e030b18
v: v3
  • Loading branch information
Jesper Juhl authored and Linus Torvalds committed Jun 22, 2005
1 parent 7e4be2b commit 90f0f3e
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 33 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: 8a5e9cf1d6626586ff08e49f400a006a9f0c3275
refs/heads/master: 990a8baf568ca1d0ae65e59783ff821794118d07
3 changes: 1 addition & 2 deletions trunk/drivers/md/dm-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,7 @@ static void crypt_dtr(struct dm_target *ti)
mempool_destroy(cc->page_pool);
mempool_destroy(cc->io_pool);

if (cc->iv_mode)
kfree(cc->iv_mode);
kfree(cc->iv_mode);
if (cc->iv_gen_ops && cc->iv_gen_ops->dtr)
cc->iv_gen_ops->dtr(cc);
crypto_free_tfm(cc->tfm);
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/md/linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ static int linear_run (mddev_t *mddev)
return 0;

out:
if (conf)
kfree(conf);
kfree(conf);
return 1;
}

Expand Down
10 changes: 3 additions & 7 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ static mddev_t * mddev_find(dev_t unit)
if (mddev->unit == unit) {
mddev_get(mddev);
spin_unlock(&all_mddevs_lock);
if (new)
kfree(new);
kfree(new);
return mddev;
}

Expand Down Expand Up @@ -458,11 +457,8 @@ static int sb_equal(mdp_super_t *sb1, mdp_super_t *sb2)
ret = 1;

abort:
if (tmp1)
kfree(tmp1);
if (tmp2)
kfree(tmp2);

kfree(tmp1);
kfree(tmp2);
return ret;
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/md/multipath.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,7 @@ static int multipath_run (mddev_t *mddev)
out_free_conf:
if (conf->pool)
mempool_destroy(conf->pool);
if (conf->multipaths)
kfree(conf->multipaths);
kfree(conf->multipaths);
kfree(conf);
mddev->private = NULL;
out:
Expand Down
12 changes: 5 additions & 7 deletions trunk/drivers/md/raid0.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,8 @@ static int raid0_run (mddev_t *mddev)
return 0;

out_free_conf:
if (conf->strip_zone)
kfree(conf->strip_zone);
if (conf->devlist)
kfree (conf->devlist);
kfree(conf->strip_zone);
kfree(conf->devlist);
kfree(conf);
mddev->private = NULL;
out:
Expand All @@ -386,11 +384,11 @@ static int raid0_stop (mddev_t *mddev)
raid0_conf_t *conf = mddev_to_conf(mddev);

blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
kfree (conf->hash_table);
kfree(conf->hash_table);
conf->hash_table = NULL;
kfree (conf->strip_zone);
kfree(conf->strip_zone);
conf->strip_zone = NULL;
kfree (conf);
kfree(conf);
mddev->private = NULL;

return 0;
Expand Down
12 changes: 4 additions & 8 deletions trunk/drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1427,10 +1427,8 @@ static int run(mddev_t *mddev)
if (conf) {
if (conf->r1bio_pool)
mempool_destroy(conf->r1bio_pool);
if (conf->mirrors)
kfree(conf->mirrors);
if (conf->poolinfo)
kfree(conf->poolinfo);
kfree(conf->mirrors);
kfree(conf->poolinfo);
kfree(conf);
mddev->private = NULL;
}
Expand All @@ -1447,10 +1445,8 @@ static int stop(mddev_t *mddev)
blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
if (conf->r1bio_pool)
mempool_destroy(conf->r1bio_pool);
if (conf->mirrors)
kfree(conf->mirrors);
if (conf->poolinfo)
kfree(conf->poolinfo);
kfree(conf->mirrors);
kfree(conf->poolinfo);
kfree(conf);
mddev->private = NULL;
return 0;
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1737,8 +1737,7 @@ static int run(mddev_t *mddev)
out_free_conf:
if (conf->r10bio_pool)
mempool_destroy(conf->r10bio_pool);
if (conf->mirrors)
kfree(conf->mirrors);
kfree(conf->mirrors);
kfree(conf);
mddev->private = NULL;
out:
Expand All @@ -1754,8 +1753,7 @@ static int stop(mddev_t *mddev)
blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
if (conf->r10bio_pool)
mempool_destroy(conf->r10bio_pool);
if (conf->mirrors)
kfree(conf->mirrors);
kfree(conf->mirrors);
kfree(conf);
mddev->private = NULL;
return 0;
Expand Down

0 comments on commit 90f0f3e

Please sign in to comment.