]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/md/raid10.c
Merge branches 'pm-sleep', 'pm-cpuidle', 'pm-cpufreq', 'pm-devfreq' and 'pm-avs'
[linux.git] / drivers / md / raid10.c
index 299c7b1c97185c7a9dcf7549f2757326b26cfea3..ec136e44aef7f89067a3320878f49d94c108d8a5 100644 (file)
@@ -191,7 +191,7 @@ static void * r10buf_pool_alloc(gfp_t gfp_flags, void *data)
 
 out_free_pages:
        while (--j >= 0)
-               resync_free_pages(&rps[j * 2]);
+               resync_free_pages(&rps[j]);
 
        j = 0;
 out_free_bio:
@@ -1525,10 +1525,9 @@ static bool raid10_make_request(struct mddev *mddev, struct bio *bio)
        int chunk_sects = chunk_mask + 1;
        int sectors = bio_sectors(bio);
 
-       if (unlikely(bio->bi_opf & REQ_PREFLUSH)) {
-               md_flush_request(mddev, bio);
+       if (unlikely(bio->bi_opf & REQ_PREFLUSH)
+           && md_flush_request(mddev, bio))
                return true;
-       }
 
        if (!md_write_start(mddev, bio))
                return false;