> @@ -2340,9 +2383,12 @@ int md_integrity_register(struct mddev *mddev) > bdev_get_integrity(reference->bdev)); > > pr_debug("md: data integrity enabled on %s\n", mdname(mddev)); > - if (bioset_integrity_create(&mddev->bio_set, BIO_POOL_SIZE)) { > + if (bioset_integrity_create(&mddev->bio_set, BIO_POOL_SIZE) || > + bioset_integrity_create(&mddev->md_io_bs, BIO_POOL_SIZE)) { > pr_err("md: failed to create integrity pool for %s\n", > mdname(mddev)); > + bioset_exit(&mddev->bio_set); > + bioset_exit(&mddev->md_io_bs); > return -EINVAL; Are you sure bioset_exit() here is correct? This is always called from pers->run() and the cleanup in case of error is handled in md_run().