struct request_queue *q = rq->q;
unsigned long flags = 0UL;
- if (bio_has_data(rq->bio) || blk_discard_rq(rq)) {
+ if (rq->bio) {
if (__end_that_request_first(rq, error, nr_bytes))
return 1;
**/
int __blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
{
- if ((bio_has_data(rq->bio) || blk_discard_rq(rq)) &&
- __end_that_request_first(rq, error, nr_bytes))
+ if (rq->bio && __end_that_request_first(rq, error, nr_bytes))
return 1;
add_disk_randomness(rq->rq_disk);