Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84567
b: refs/heads/master
c: 6ed7ade
h: refs/heads/master
i:
  84565: 7eb1fd6
  84563: b7a2085
  84559: 38affc0
v: v3
  • Loading branch information
Milan Broz authored and Alasdair G Kergon committed Feb 8, 2008
1 parent 7c8c06c commit 3e958c6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 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: a26ffd4aa99d6ace82852930edf09e450cc7dc8d
refs/heads/master: 6ed7ade89657e71da3afa7cb13ad25570a95dd9d
26 changes: 13 additions & 13 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,15 +982,15 @@ static struct mapped_device *alloc_dev(int minor)
}

if (!try_module_get(THIS_MODULE))
goto bad0;
goto bad_module_get;

/* get a minor number for the dev */
if (minor == DM_ANY_MINOR)
r = next_free_minor(md, &minor);
else
r = specific_minor(md, minor);
if (r < 0)
goto bad1;
goto bad_minor;

memset(md, 0, sizeof(*md));
init_rwsem(&md->io_lock);
Expand All @@ -1006,7 +1006,7 @@ static struct mapped_device *alloc_dev(int minor)

md->queue = blk_alloc_queue(GFP_KERNEL);
if (!md->queue)
goto bad1_free_minor;
goto bad_queue;

md->queue->queuedata = md;
md->queue->backing_dev_info.congested_fn = dm_any_congested;
Expand All @@ -1017,19 +1017,19 @@ static struct mapped_device *alloc_dev(int minor)

md->io_pool = mempool_create_slab_pool(MIN_IOS, _io_cache);
if (!md->io_pool)
goto bad2;
goto bad_io_pool;

md->tio_pool = mempool_create_slab_pool(MIN_IOS, _tio_cache);
if (!md->tio_pool)
goto bad3;
goto bad_tio_pool;

md->bs = bioset_create(16, 16);
if (!md->bs)
goto bad_no_bioset;

md->disk = alloc_disk(1);
if (!md->disk)
goto bad4;
goto bad_disk;

atomic_set(&md->pending, 0);
init_waitqueue_head(&md->wait);
Expand All @@ -1053,19 +1053,19 @@ static struct mapped_device *alloc_dev(int minor)

return md;

bad4:
bad_disk:
bioset_free(md->bs);
bad_no_bioset:
bad_no_bioset:
mempool_destroy(md->tio_pool);
bad3:
bad_tio_pool:
mempool_destroy(md->io_pool);
bad2:
bad_io_pool:
blk_cleanup_queue(md->queue);
bad1_free_minor:
bad_queue:
free_minor(minor);
bad1:
bad_minor:
module_put(THIS_MODULE);
bad0:
bad_module_get:
kfree(md);
return NULL;
}
Expand Down

0 comments on commit 3e958c6

Please sign in to comment.