提交 9b61764b 编写于 作者: J Jens Axboe

[SG] Update block layer to use sg helpers

Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 82f66fbe
......@@ -1354,8 +1354,9 @@ 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++;
......@@ -1363,6 +1364,9 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
bvprv = bvec;
} /* segments in rq */
if (sg)
__sg_mark_end(sg);
return nsegs;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册