diff options
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index d21e1284604f..1e0e6dd51501 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -792,12 +792,12 @@ static void dm_end_request(struct request *clone, int error) | |||
792 | { | 792 | { |
793 | int rw = rq_data_dir(clone); | 793 | int rw = rq_data_dir(clone); |
794 | int run_queue = 1; | 794 | int run_queue = 1; |
795 | bool is_barrier = blk_barrier_rq(clone); | 795 | bool is_barrier = clone->cmd_flags & REQ_HARDBARRIER; |
796 | struct dm_rq_target_io *tio = clone->end_io_data; | 796 | struct dm_rq_target_io *tio = clone->end_io_data; |
797 | struct mapped_device *md = tio->md; | 797 | struct mapped_device *md = tio->md; |
798 | struct request *rq = tio->orig; | 798 | struct request *rq = tio->orig; |
799 | 799 | ||
800 | if (blk_pc_request(rq) && !is_barrier) { | 800 | if (rq->cmd_type == REQ_TYPE_BLOCK_PC && !is_barrier) { |
801 | rq->errors = clone->errors; | 801 | rq->errors = clone->errors; |
802 | rq->resid_len = clone->resid_len; | 802 | rq->resid_len = clone->resid_len; |
803 | 803 | ||
@@ -844,7 +844,7 @@ void dm_requeue_unmapped_request(struct request *clone) | |||
844 | struct request_queue *q = rq->q; | 844 | struct request_queue *q = rq->q; |
845 | unsigned long flags; | 845 | unsigned long flags; |
846 | 846 | ||
847 | if (unlikely(blk_barrier_rq(clone))) { | 847 | if (unlikely(clone->cmd_flags & REQ_HARDBARRIER)) { |
848 | /* | 848 | /* |
849 | * Barrier clones share an original request. | 849 | * Barrier clones share an original request. |
850 | * Leave it to dm_end_request(), which handles this special | 850 | * Leave it to dm_end_request(), which handles this special |
@@ -943,7 +943,7 @@ static void dm_complete_request(struct request *clone, int error) | |||
943 | struct dm_rq_target_io *tio = clone->end_io_data; | 943 | struct dm_rq_target_io *tio = clone->end_io_data; |
944 | struct request *rq = tio->orig; | 944 | struct request *rq = tio->orig; |
945 | 945 | ||
946 | if (unlikely(blk_barrier_rq(clone))) { | 946 | if (unlikely(clone->cmd_flags & REQ_HARDBARRIER)) { |
947 | /* | 947 | /* |
948 | * Barrier clones share an original request. So can't use | 948 | * Barrier clones share an original request. So can't use |
949 | * softirq_done with the original. | 949 | * softirq_done with the original. |
@@ -972,7 +972,7 @@ void dm_kill_unmapped_request(struct request *clone, int error) | |||
972 | struct dm_rq_target_io *tio = clone->end_io_data; | 972 | struct dm_rq_target_io *tio = clone->end_io_data; |
973 | struct request *rq = tio->orig; | 973 | struct request *rq = tio->orig; |
974 | 974 | ||
975 | if (unlikely(blk_barrier_rq(clone))) { | 975 | if (unlikely(clone->cmd_flags & REQ_HARDBARRIER)) { |
976 | /* | 976 | /* |
977 | * Barrier clones share an original request. | 977 | * Barrier clones share an original request. |
978 | * Leave it to dm_end_request(), which handles this special | 978 | * Leave it to dm_end_request(), which handles this special |