[PATCH] md: fail IO request to md that require a barrier.
[firefly-linux-kernel-4.4.55.git] / drivers / md / raid1.c
index 51d9645ed09c5e8ff79aa9e7a6604e94dc274a54..ace41c571aeb3f2e842d65fc2fa9959240bf4054 100644 (file)
@@ -555,6 +555,10 @@ static int make_request(request_queue_t *q, struct bio * bio)
        unsigned long flags;
        struct bio_list bl;
 
+       if (unlikely(bio_barrier(bio))) {
+               bio_endio(bio, bio->bi_size, -EOPNOTSUPP);
+               return 0;
+       }
 
        /*
         * Register the new request and wait if the reconstruction