Message ID | 1487086143-10255-3-git-send-email-tom.leiming@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 7e9a495e4160..b5e2adf3493b 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5228,8 +5228,11 @@ int md_run(struct mddev *mddev) sysfs_notify_dirent_safe(rdev->sysfs_state); } - if (mddev->bio_set == NULL) + if (mddev->bio_set == NULL) { mddev->bio_set = bioset_create(BIO_POOL_SIZE, 0); + if (!mddev->bio_set) + return -ENOMEM; + } spin_lock(&pers_lock); pers = find_pers(mddev->level, mddev->clevel);