aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2016-06-02 15:08:09 -0400
committerMike Snitzer <snitzer@redhat.com>2016-06-14 17:25:01 -0400
commitbfcee0e312f9d11c5d009be213ee46a9fb765f38 (patch)
tree65bb2cb7d4ce9b989140823950c91ef0129a3f5c /drivers/md/dm-raid.c
parent4286325b4b0dc9d67e829e91c5377e070adaffec (diff)
dm raid: rename functions that alloc and free struct raid_set
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r--drivers/md/dm-raid.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 32c3bae69aae..8fa9f3e90784 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -587,8 +587,8 @@ static void rs_set_new(struct raid_set *rs)
587 mddev->delta_disks = 0; 587 mddev->delta_disks = 0;
588} 588}
589 589
590 590static struct raid_set *raid_set_alloc(struct dm_target *ti, struct raid_type *raid_type,
591static struct raid_set *context_alloc(struct dm_target *ti, struct raid_type *raid_type, unsigned raid_devs) 591 unsigned raid_devs)
592{ 592{
593 unsigned i; 593 unsigned i;
594 struct raid_set *rs; 594 struct raid_set *rs;
@@ -634,7 +634,7 @@ static struct raid_set *context_alloc(struct dm_target *ti, struct raid_type *ra
634 return rs; 634 return rs;
635} 635}
636 636
637static void context_free(struct raid_set *rs) 637static void raid_set_free(struct raid_set *rs)
638{ 638{
639 int i; 639 int i;
640 640
@@ -663,7 +663,7 @@ static void context_free(struct raid_set *rs)
663 * <meta_dev> - 663 * <meta_dev> -
664 * 664 *
665 * This code parses those words. If there is a failure, 665 * This code parses those words. If there is a failure,
666 * the caller must use context_free to unwind the operations. 666 * the caller must use raid_set_free() to unwind the operations.
667 */ 667 */
668static int parse_dev_params(struct raid_set *rs, struct dm_arg_set *as) 668static int parse_dev_params(struct raid_set *rs, struct dm_arg_set *as)
669{ 669{
@@ -2260,7 +2260,7 @@ static int raid_ctr(struct dm_target *ti, unsigned argc, char **argv)
2260 return -EINVAL; 2260 return -EINVAL;
2261 } 2261 }
2262 2262
2263 rs = context_alloc(ti, rt, num_raid_devs); 2263 rs = raid_set_alloc(ti, rt, num_raid_devs);
2264 if (IS_ERR(rs)) 2264 if (IS_ERR(rs))
2265 return PTR_ERR(rs); 2265 return PTR_ERR(rs);
2266 2266
@@ -2341,7 +2341,7 @@ static int raid_ctr(struct dm_target *ti, unsigned argc, char **argv)
2341size_mismatch: 2341size_mismatch:
2342 md_stop(&rs->md); 2342 md_stop(&rs->md);
2343bad: 2343bad:
2344 context_free(rs); 2344 raid_set_free(rs);
2345 2345
2346 return r; 2346 return r;
2347} 2347}
@@ -2352,7 +2352,7 @@ static void raid_dtr(struct dm_target *ti)
2352 2352
2353 list_del_init(&rs->callbacks.list); 2353 list_del_init(&rs->callbacks.list);
2354 md_stop(&rs->md); 2354 md_stop(&rs->md);
2355 context_free(rs); 2355 raid_set_free(rs);
2356} 2356}
2357 2357
2358static int raid_map(struct dm_target *ti, struct bio *bio) 2358static int raid_map(struct dm_target *ti, struct bio *bio)