diff options
-rw-r--r-- | drivers/md/md.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 2166af8a7654..58bee2366ea8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3862,6 +3862,8 @@ static int md_alloc(dev_t dev, char *name) | |||
3862 | if (mddev2->gendisk && | 3862 | if (mddev2->gendisk && |
3863 | strcmp(mddev2->gendisk->disk_name, name) == 0) { | 3863 | strcmp(mddev2->gendisk->disk_name, name) == 0) { |
3864 | spin_unlock(&all_mddevs_lock); | 3864 | spin_unlock(&all_mddevs_lock); |
3865 | mutex_unlock(&disks_mutex); | ||
3866 | mddev_put(mddev); | ||
3865 | return -EEXIST; | 3867 | return -EEXIST; |
3866 | } | 3868 | } |
3867 | spin_unlock(&all_mddevs_lock); | 3869 | spin_unlock(&all_mddevs_lock); |