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, 5 insertions, 10 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 4882ce7e88a3..dd953b189f45 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -835,7 +835,11 @@ static int __split_bio(struct mapped_device *md, struct bio *bio)
835 ci.map = dm_get_table(md); 835 ci.map = dm_get_table(md);
836 if (unlikely(!ci.map)) 836 if (unlikely(!ci.map))
837 return -EIO; 837 return -EIO;
838 838 if (unlikely(bio_barrier(bio) && !dm_table_barrier_ok(ci.map))) {
839 dm_table_put(ci.map);
840 bio_endio(bio, -EOPNOTSUPP);
841 return 0;
842 }
839 ci.md = md; 843 ci.md = md;
840 ci.bio = bio; 844 ci.bio = bio;
841 ci.io = alloc_io(md); 845 ci.io = alloc_io(md);
@@ -919,15 +923,6 @@ static int dm_request(struct request_queue *q, struct bio *bio)
919 struct mapped_device *md = q->queuedata; 923 struct mapped_device *md = q->queuedata;
920 int cpu; 924 int cpu;
921 925
922 /*
923 * There is no use in forwarding any barrier request since we can't
924 * guarantee it is (or can be) handled by the targets correctly.
925 */
926 if (unlikely(bio_barrier(bio))) {
927 bio_endio(bio, -EOPNOTSUPP);
928 return 0;
929 }
930
931 down_read(&md->io_lock); 926 down_read(&md->io_lock);
932 927
933 cpu = part_stat_lock(); 928 cpu = part_stat_lock();