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 29, 2014
1 parent f6f9bd8 commit 1fefb13
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 @@ -790,7 +790,7 @@ int bio_add_pc_page(struct request_queue *q, struct bio *bio, struct page
}

/* If we may be able to merge these biovecs, force a recount */
if (bio->bi_vcnt > 1 && (BIOVEC_PHYS_MERGEABLE(bvec-1, bvec)))
if (bio->bi_vcnt > 1)
bio->bi_flags &= ~(1 << BIO_SEG_VALID);

done:
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 1fefb13

Please sign in to comment.