I think we need to release disks_mutex and put mddev here. The other return paths are like that. regards, dan carpenter Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> --- orig/drivers/md/md.c 2009-04-15 18:32:05.000000000 +0300 +++ devel/drivers/md/md.c 2009-04-15 18:32:48.000000000 +0300 @@ -3860,6 +3860,8 @@ if (mddev2->gendisk && strcmp(mddev2->gendisk->disk_name, name) == 0) { spin_unlock(&all_mddevs_lock); + mutex_unlock(&disks_mutex); + mddev_put(mddev); return -EEXIST; } spin_unlock(&all_mddevs_lock); -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html