Skip to content

Commit

Permalink
[SG] Update block layer to use sg helpers
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe committed Oct 22, 2007
1 parent 82f66fb commit 9b61764
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1354,15 +1354,19 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
else
sg = sg_next(sg);

memset(sg, 0, sizeof(*sg));
sg->page = bvec->bv_page;
sg_dma_len(sg) = 0;
sg_dma_address(sg) = 0;
sg_set_page(sg, bvec->bv_page);
sg->length = nbytes;
sg->offset = bvec->bv_offset;
nsegs++;
}
bvprv = bvec;
} /* segments in rq */

if (sg)
__sg_mark_end(sg);

return nsegs;
}

Expand Down

0 comments on commit 9b61764

Please sign in to comment.