Skip to content

Commit

Permalink
block: fix compile errors
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Dongsu Park committed Dec 12, 2014
1 parent c98390e commit 8d710e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion block/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down
4 changes: 2 additions & 2 deletions block/blk-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 8d710e8

Please sign in to comment.