From: Jens Axboe Date: Mon, 22 Oct 2007 17:39:33 +0000 (+0200) Subject: [SG] Update block layer to use sg helpers X-Git-Tag: v2.6.24-rc1~71^2~8 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9b61764bcb4360e04386f0415a01da8271631004;p=linux-2.6-omap-h63xx.git [SG] Update block layer to use sg helpers Signed-off-by: Jens Axboe --- diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 8025d646ab3..61c2e396f2f 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -1354,8 +1354,9 @@ new_segment: 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 @@ new_segment: bvprv = bvec; } /* segments in rq */ + if (sg) + __sg_mark_end(sg); + return nsegs; }