static inline void blk_end_request_all(struct request *rq, int error)
{
bool pending;
+ unsigned int bidi_bytes = 0;
- pending = blk_end_request(rq, error, blk_rq_bytes(rq));
+ if (unlikely(blk_bidi_rq(rq)))
+ bidi_bytes = blk_rq_bytes(rq->next_rq);
+
+ pending = blk_end_bidi_request(rq, error, blk_rq_bytes(rq), bidi_bytes);
BUG_ON(pending);
}
static inline void __blk_end_request_all(struct request *rq, int error)
{
bool pending;
+ unsigned int bidi_bytes = 0;
+
+ if (unlikely(blk_bidi_rq(rq)))
+ bidi_bytes = blk_rq_bytes(rq->next_rq);
- pending = __blk_end_request(rq, error, blk_rq_bytes(rq));
+ pending = __blk_end_bidi_request(rq, error, blk_rq_bytes(rq), bidi_bytes);
BUG_ON(pending);
}