|
@@ -2655,7 +2655,8 @@ static void handle_write_completed(struct r10conf *conf, struct r10bio *r10_bio)
|
|
for (m = 0; m < conf->copies; m++) {
|
|
for (m = 0; m < conf->copies; m++) {
|
|
int dev = r10_bio->devs[m].devnum;
|
|
int dev = r10_bio->devs[m].devnum;
|
|
rdev = conf->mirrors[dev].rdev;
|
|
rdev = conf->mirrors[dev].rdev;
|
|
- if (r10_bio->devs[m].bio == NULL)
|
|
|
|
|
|
+ if (r10_bio->devs[m].bio == NULL ||
|
|
|
|
+ r10_bio->devs[m].bio->bi_end_io == NULL)
|
|
continue;
|
|
continue;
|
|
if (!r10_bio->devs[m].bio->bi_status) {
|
|
if (!r10_bio->devs[m].bio->bi_status) {
|
|
rdev_clear_badblocks(
|
|
rdev_clear_badblocks(
|
|
@@ -2670,7 +2671,8 @@ static void handle_write_completed(struct r10conf *conf, struct r10bio *r10_bio)
|
|
md_error(conf->mddev, rdev);
|
|
md_error(conf->mddev, rdev);
|
|
}
|
|
}
|
|
rdev = conf->mirrors[dev].replacement;
|
|
rdev = conf->mirrors[dev].replacement;
|
|
- if (r10_bio->devs[m].repl_bio == NULL)
|
|
|
|
|
|
+ if (r10_bio->devs[m].repl_bio == NULL ||
|
|
|
|
+ r10_bio->devs[m].repl_bio->bi_end_io == NULL)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
if (!r10_bio->devs[m].repl_bio->bi_status) {
|
|
if (!r10_bio->devs[m].repl_bio->bi_status) {
|