md: improve handling of bio with REQ_PREFLUSH in md_flush_request()
[sfrench/cifs-2.6.git] / drivers / md / md-multipath.c
index 6780938d29914e0ed4aef76fc33d9fa44e2be5ed..152f9e65a22665f33208b535680bd68101fcda43 100644 (file)
@@ -104,10 +104,9 @@ static bool multipath_make_request(struct mddev *mddev, struct bio * bio)
        struct multipath_bh * mp_bh;
        struct multipath_info *multipath;
 
-       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;
-       }
 
        mp_bh = mempool_alloc(&conf->pool, GFP_NOIO);