> -static struct mddev *mddev_find(dev_t unit) > +static struct mddev *mddev_find(dev_t unit, bool create) This just makes the mess that is mddev_find even worse. Please take a look at the patches at the beginning of the "move bd_mutex to the gendisk" series to try to clean this up properly.