aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 25d86e2c01f2..ab3b5d84df65 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -851,11 +851,7 @@ static void __split_and_process_bio(struct mapped_device *md, struct bio *bio)
851 bio_io_error(bio); 851 bio_io_error(bio);
852 return; 852 return;
853 } 853 }
854 if (unlikely(bio_barrier(bio) && !dm_table_barrier_ok(ci.map))) { 854
855 dm_table_put(ci.map);
856 bio_endio(bio, -EOPNOTSUPP);
857 return;
858 }
859 ci.md = md; 855 ci.md = md;
860 ci.bio = bio; 856 ci.bio = bio;
861 ci.io = alloc_io(md); 857 ci.io = alloc_io(md);
@@ -937,6 +933,15 @@ static int dm_request(struct request_queue *q, struct bio *bio)
937 struct mapped_device *md = q->queuedata; 933 struct mapped_device *md = q->queuedata;
938 int cpu; 934 int cpu;
939 935
936 /*
937 * There is no use in forwarding any barrier request since we can't
938 * guarantee it is (or can be) handled by the targets correctly.
939 */
940 if (unlikely(bio_barrier(bio))) {
941 bio_endio(bio, -EOPNOTSUPP);
942 return 0;
943 }
944
940 down_read(&md->io_lock); 945 down_read(&md->io_lock);
941 946
942 cpu = part_stat_lock(); 947 cpu = part_stat_lock();