diff options
author | Alasdair G Kergon <agk@redhat.com> | 2006-03-27 04:17:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:44:59 -0500 |
commit | 9ade92a9a5b0a3a10efa6551b8c67a9277bf0438 (patch) | |
tree | 976b3d4f8a90d08cf9db1f7afb40423570360d85 /drivers/md/dm-ioctl.c | |
parent | 7e51f257e87297a5b6fe6d136a8ef67206aaf3a8 (diff) |
[PATCH] dm: tidy mdptr
Change dm_get_mdptr() to take a struct mapped_device instead of dev_t.
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/dm-ioctl.c')
-rw-r--r-- | drivers/md/dm-ioctl.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 442e2be6052e..0693b6f54b7d 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -600,12 +600,22 @@ static int dev_create(struct dm_ioctl *param, size_t param_size) | |||
600 | */ | 600 | */ |
601 | static struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param) | 601 | static struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param) |
602 | { | 602 | { |
603 | struct mapped_device *md; | ||
604 | void *mdptr = NULL; | ||
605 | |||
603 | if (*param->uuid) | 606 | if (*param->uuid) |
604 | return __get_uuid_cell(param->uuid); | 607 | return __get_uuid_cell(param->uuid); |
605 | else if (*param->name) | 608 | |
609 | if (*param->name) | ||
606 | return __get_name_cell(param->name); | 610 | return __get_name_cell(param->name); |
607 | else | 611 | |
608 | return dm_get_mdptr(huge_decode_dev(param->dev)); | 612 | md = dm_get_md(huge_decode_dev(param->dev)); |
613 | if (md) { | ||
614 | mdptr = dm_get_mdptr(md); | ||
615 | dm_put(md); | ||
616 | } | ||
617 | |||
618 | return mdptr; | ||
609 | } | 619 | } |
610 | 620 | ||
611 | static struct mapped_device *find_device(struct dm_ioctl *param) | 621 | static struct mapped_device *find_device(struct dm_ioctl *param) |