Commit 51f5eb10 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md: Fix up oops-able error message

If we get here, then bio->bi_bdev isn't set, so we really
shouldn't de-reference it.
parent 8c33f844
...@@ -866,7 +866,7 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio) ...@@ -866,7 +866,7 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio)
* Nowhere to write this to... I guess we * Nowhere to write this to... I guess we
* must be done * must be done
*/ */
printk(IO_ERROR, bdev_partition_name(bio->bi_bdev), r1_bio->sector); printk(KERN_ALERT "raid1: sync aborting as there is nowhere to write sector %lu\n", r1_bio->sector);
md_done_sync(mddev, r1_bio->master_bio->bi_size >> 9, 0); md_done_sync(mddev, r1_bio->master_bio->bi_size >> 9, 0);
resume_device(conf); resume_device(conf);
put_buf(r1_bio); put_buf(r1_bio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment