diff options
-rw-r--r-- | block/blk-core.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index c580b0138a7f..c7068520794b 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -2644,8 +2644,6 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes) | |||
2644 | return false; | 2644 | return false; |
2645 | } | 2645 | } |
2646 | 2646 | ||
2647 | WARN_ON_ONCE(req->rq_flags & RQF_SPECIAL_PAYLOAD); | ||
2648 | |||
2649 | req->__data_len -= total_bytes; | 2647 | req->__data_len -= total_bytes; |
2650 | 2648 | ||
2651 | /* update sector only for requests with clear definition of sector */ | 2649 | /* update sector only for requests with clear definition of sector */ |
@@ -2658,17 +2656,19 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes) | |||
2658 | req->cmd_flags |= req->bio->bi_opf & REQ_FAILFAST_MASK; | 2656 | req->cmd_flags |= req->bio->bi_opf & REQ_FAILFAST_MASK; |
2659 | } | 2657 | } |
2660 | 2658 | ||
2661 | /* | 2659 | if (!(req->rq_flags & RQF_SPECIAL_PAYLOAD)) { |
2662 | * If total number of sectors is less than the first segment | 2660 | /* |
2663 | * size, something has gone terribly wrong. | 2661 | * If total number of sectors is less than the first segment |
2664 | */ | 2662 | * size, something has gone terribly wrong. |
2665 | if (blk_rq_bytes(req) < blk_rq_cur_bytes(req)) { | 2663 | */ |
2666 | blk_dump_rq_flags(req, "request botched"); | 2664 | if (blk_rq_bytes(req) < blk_rq_cur_bytes(req)) { |
2667 | req->__data_len = blk_rq_cur_bytes(req); | 2665 | blk_dump_rq_flags(req, "request botched"); |
2668 | } | 2666 | req->__data_len = blk_rq_cur_bytes(req); |
2667 | } | ||
2669 | 2668 | ||
2670 | /* recalculate the number of segments */ | 2669 | /* recalculate the number of segments */ |
2671 | blk_recalc_rq_segments(req); | 2670 | blk_recalc_rq_segments(req); |
2671 | } | ||
2672 | 2672 | ||
2673 | return true; | 2673 | return true; |
2674 | } | 2674 | } |