Commit e439ab71 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: remove the nr_sectors variable in generic_make_request_checks

The variable is only used once, so just open code the bio_sector()
there.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 833f84e2
......@@ -974,7 +974,6 @@ static noinline_for_stack bool
generic_make_request_checks(struct bio *bio)
{
struct request_queue *q = bio->bi_disk->queue;
int nr_sectors = bio_sectors(bio);
blk_status_t status = BLK_STS_IOERR;
might_sleep();
......@@ -1007,7 +1006,7 @@ generic_make_request_checks(struct bio *bio)
if (op_is_flush(bio->bi_opf) &&
!test_bit(QUEUE_FLAG_WC, &q->queue_flags)) {
bio->bi_opf &= ~(REQ_PREFLUSH | REQ_FUA);
if (!nr_sectors) {
if (!bio_sectors(bio)) {
status = BLK_STS_OK;
goto end_io;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment