From 8d710e8f2acd94a2c3d93a9b4842a87d1b06dc56 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Mon, 24 Nov 2014 16:41:45 +0100 Subject: [PATCH] block: fix compile errors Fix various compile errors, e.g. getting rid of BIOVEC_PHYS_MERGEABLE, using bvec instead of sg, set bio as the 2nd arg of __blk_segment_map_sg(), etc. --- block/bio.c | 2 +- block/blk-merge.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block/bio.c b/block/bio.c index 0689141a54149f..602e0a3e9f8f30 100644 --- a/block/bio.c +++ b/block/bio.c @@ -786,7 +786,7 @@ int bio_add_pc_page(struct request_queue *q, struct bio *bio, struct page bvec->bv_offset = offset; /* If we may be able to merge these biovecs, force a recount */ - if (bio->bi_vcnt && (BIOVEC_PHYS_MERGEABLE(bvec-1, bvec))) + if (bio->bi_vcnt) bio->bi_flags &= ~(1 << BIO_SEG_VALID); bio->bi_vcnt++; diff --git a/block/blk-merge.c b/block/blk-merge.c index 94848023ec1d78..9c4254d33e991d 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -289,7 +289,7 @@ static int __blk_bios_map_sg(struct request_queue *q, struct bio *bio, struct scatterlist *sglist, struct scatterlist **sg) { - struct scatterlist *sg = NULL; + struct bio_vec bvec; unsigned nsegs; if (bio->bi_rw & REQ_DISCARD) { @@ -318,7 +318,7 @@ static int __blk_bios_map_sg(struct request_queue *q, struct bio *bio, /* * for each bio in rq */ - nsegs = __blk_segment_map_sg(q, rq->bio, sglist, &sg); + nsegs = __blk_segment_map_sg(q, bio, sglist, sg); return nsegs; }