diff options
Diffstat (limited to 'drivers/md/dm-ioctl.c')
-rw-r--r-- | drivers/md/dm-ioctl.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index f7e743691aa8..c826b3e1799a 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001, 2002 Sistina Software (UK) Limited. | 2 | * Copyright (C) 2001, 2002 Sistina Software (UK) Limited. |
3 | * Copyright (C) 2004 - 2005 Red Hat, Inc. All rights reserved. | 3 | * Copyright (C) 2004 - 2006 Red Hat, Inc. All rights reserved. |
4 | * | 4 | * |
5 | * This file is released under the GPL. | 5 | * This file is released under the GPL. |
6 | */ | 6 | */ |
@@ -578,7 +578,7 @@ static int __dev_status(struct mapped_device *md, struct dm_ioctl *param) | |||
578 | 578 | ||
579 | static int dev_create(struct dm_ioctl *param, size_t param_size) | 579 | static int dev_create(struct dm_ioctl *param, size_t param_size) |
580 | { | 580 | { |
581 | int r; | 581 | int r, m = DM_ANY_MINOR; |
582 | struct mapped_device *md; | 582 | struct mapped_device *md; |
583 | 583 | ||
584 | r = check_name(param->name); | 584 | r = check_name(param->name); |
@@ -586,10 +586,9 @@ static int dev_create(struct dm_ioctl *param, size_t param_size) | |||
586 | return r; | 586 | return r; |
587 | 587 | ||
588 | if (param->flags & DM_PERSISTENT_DEV_FLAG) | 588 | if (param->flags & DM_PERSISTENT_DEV_FLAG) |
589 | r = dm_create_with_minor(MINOR(huge_decode_dev(param->dev)), &md); | 589 | m = MINOR(huge_decode_dev(param->dev)); |
590 | else | ||
591 | r = dm_create(&md); | ||
592 | 590 | ||
591 | r = dm_create(m, &md); | ||
593 | if (r) | 592 | if (r) |
594 | return r; | 593 | return r; |
595 | 594 | ||