diff options
author | Mark Brown <broonie@linaro.org> | 2014-01-14 18:14:47 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-14 18:14:47 +0400 |
commit | 13ea3300100ec3461560b1e061033cd167333a86 (patch) | |
tree | c60a016a06c488adada6959516e2a2de96d6d7d3 /drivers/md/md.c | |
parent | b7ed6b88b2a5e961eeb939ef637a3cbb435a23a7 (diff) | |
parent | 68e67d97e1f91ed11e041b67f3a1336f518c608f (diff) | |
download | linux-13ea3300100ec3461560b1e061033cd167333a86.tar.xz |
Merge branch 'topic/rcar' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-rspi
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index b6b7a2866c9e..21f4d7ff0da2 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -776,16 +776,10 @@ void md_super_wait(struct mddev *mddev) finish_wait(&mddev->sb_wait, &wq); } -static void bi_complete(struct bio *bio, int error) -{ - complete((struct completion*)bio->bi_private); -} - int sync_page_io(struct md_rdev *rdev, sector_t sector, int size, struct page *page, int rw, bool metadata_op) { struct bio *bio = bio_alloc_mddev(GFP_NOIO, 1, rdev->mddev); - struct completion event; int ret; rw |= REQ_SYNC; @@ -801,11 +795,7 @@ int sync_page_io(struct md_rdev *rdev, sector_t sector, int size, else bio->bi_sector = sector + rdev->data_offset; bio_add_page(bio, page, size, 0); - init_completion(&event); - bio->bi_private = &event; - bio->bi_end_io = bi_complete; - submit_bio(rw, bio); - wait_for_completion(&event); + submit_bio_wait(rw, bio); ret = test_bit(BIO_UPTODATE, &bio->bi_flags); bio_put(bio); @@ -7777,7 +7767,7 @@ void md_check_recovery(struct mddev *mddev) if (mddev->ro && !test_bit(MD_RECOVERY_NEEDED, &mddev->recovery)) return; if ( ! ( - (mddev->flags & ~ (1<<MD_CHANGE_PENDING)) || + (mddev->flags & MD_UPDATE_SB_FLAGS & ~ (1<<MD_CHANGE_PENDING)) || test_bit(MD_RECOVERY_NEEDED, &mddev->recovery) || test_bit(MD_RECOVERY_DONE, &mddev->recovery) || (mddev->external == 0 && mddev->safemode == 1) || |