diff options
author | Milan Broz <mbroz@redhat.com> | 2008-02-07 21:10:19 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2008-02-07 21:10:19 -0500 |
commit | 6ed7ade89657e71da3afa7cb13ad25570a95dd9d (patch) | |
tree | 713c0fc55b5802c92fa160d65eba1e692e9ff9fc | |
parent | a26ffd4aa99d6ace82852930edf09e450cc7dc8d (diff) |
dm: tidy alloc_dev labels
Tidy labels in alloc_dev to make later patches more clear.
No functional change in this patch.
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
-rw-r--r-- | drivers/md/dm.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index d16bb5b80789..52427e15189b 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -982,7 +982,7 @@ static struct mapped_device *alloc_dev(int minor) | |||
982 | } | 982 | } |
983 | 983 | ||
984 | if (!try_module_get(THIS_MODULE)) | 984 | if (!try_module_get(THIS_MODULE)) |
985 | goto bad0; | 985 | goto bad_module_get; |
986 | 986 | ||
987 | /* get a minor number for the dev */ | 987 | /* get a minor number for the dev */ |
988 | if (minor == DM_ANY_MINOR) | 988 | if (minor == DM_ANY_MINOR) |
@@ -990,7 +990,7 @@ static struct mapped_device *alloc_dev(int minor) | |||
990 | else | 990 | else |
991 | r = specific_minor(md, minor); | 991 | r = specific_minor(md, minor); |
992 | if (r < 0) | 992 | if (r < 0) |
993 | goto bad1; | 993 | goto bad_minor; |
994 | 994 | ||
995 | memset(md, 0, sizeof(*md)); | 995 | memset(md, 0, sizeof(*md)); |
996 | init_rwsem(&md->io_lock); | 996 | init_rwsem(&md->io_lock); |
@@ -1006,7 +1006,7 @@ static struct mapped_device *alloc_dev(int minor) | |||
1006 | 1006 | ||
1007 | md->queue = blk_alloc_queue(GFP_KERNEL); | 1007 | md->queue = blk_alloc_queue(GFP_KERNEL); |
1008 | if (!md->queue) | 1008 | if (!md->queue) |
1009 | goto bad1_free_minor; | 1009 | goto bad_queue; |
1010 | 1010 | ||
1011 | md->queue->queuedata = md; | 1011 | md->queue->queuedata = md; |
1012 | md->queue->backing_dev_info.congested_fn = dm_any_congested; | 1012 | md->queue->backing_dev_info.congested_fn = dm_any_congested; |
@@ -1017,11 +1017,11 @@ static struct mapped_device *alloc_dev(int minor) | |||
1017 | 1017 | ||
1018 | md->io_pool = mempool_create_slab_pool(MIN_IOS, _io_cache); | 1018 | md->io_pool = mempool_create_slab_pool(MIN_IOS, _io_cache); |
1019 | if (!md->io_pool) | 1019 | if (!md->io_pool) |
1020 | goto bad2; | 1020 | goto bad_io_pool; |
1021 | 1021 | ||
1022 | md->tio_pool = mempool_create_slab_pool(MIN_IOS, _tio_cache); | 1022 | md->tio_pool = mempool_create_slab_pool(MIN_IOS, _tio_cache); |
1023 | if (!md->tio_pool) | 1023 | if (!md->tio_pool) |
1024 | goto bad3; | 1024 | goto bad_tio_pool; |
1025 | 1025 | ||
1026 | md->bs = bioset_create(16, 16); | 1026 | md->bs = bioset_create(16, 16); |
1027 | if (!md->bs) | 1027 | if (!md->bs) |
@@ -1029,7 +1029,7 @@ static struct mapped_device *alloc_dev(int minor) | |||
1029 | 1029 | ||
1030 | md->disk = alloc_disk(1); | 1030 | md->disk = alloc_disk(1); |
1031 | if (!md->disk) | 1031 | if (!md->disk) |
1032 | goto bad4; | 1032 | goto bad_disk; |
1033 | 1033 | ||
1034 | atomic_set(&md->pending, 0); | 1034 | atomic_set(&md->pending, 0); |
1035 | init_waitqueue_head(&md->wait); | 1035 | init_waitqueue_head(&md->wait); |
@@ -1053,19 +1053,19 @@ static struct mapped_device *alloc_dev(int minor) | |||
1053 | 1053 | ||
1054 | return md; | 1054 | return md; |
1055 | 1055 | ||
1056 | bad4: | 1056 | bad_disk: |
1057 | bioset_free(md->bs); | 1057 | bioset_free(md->bs); |
1058 | bad_no_bioset: | 1058 | bad_no_bioset: |
1059 | mempool_destroy(md->tio_pool); | 1059 | mempool_destroy(md->tio_pool); |
1060 | bad3: | 1060 | bad_tio_pool: |
1061 | mempool_destroy(md->io_pool); | 1061 | mempool_destroy(md->io_pool); |
1062 | bad2: | 1062 | bad_io_pool: |
1063 | blk_cleanup_queue(md->queue); | 1063 | blk_cleanup_queue(md->queue); |
1064 | bad1_free_minor: | 1064 | bad_queue: |
1065 | free_minor(minor); | 1065 | free_minor(minor); |
1066 | bad1: | 1066 | bad_minor: |
1067 | module_put(THIS_MODULE); | 1067 | module_put(THIS_MODULE); |
1068 | bad0: | 1068 | bad_module_get: |
1069 | kfree(md); | 1069 | kfree(md); |
1070 | return NULL; | 1070 | return NULL; |
1071 | } | 1071 | } |