summaryrefslogtreecommitdiff
path: root/block/ll_rw_blk.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-10-22 21:39:33 +0400
committerJens Axboe <jens.axboe@oracle.com>2007-10-22 21:39:33 +0400
commit9b61764bcb4360e04386f0415a01da8271631004 (patch)
tree8e0a39c0e9d36f5114d14383243da328de1c72eb /block/ll_rw_blk.c
parent82f66fbef58de4ad7519708d0b9e685e20fa4e8a (diff)
downloadlinux-9b61764bcb4360e04386f0415a01da8271631004.tar.xz
[SG] Update block layer to use sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r--block/ll_rw_blk.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 8025d646ab30..61c2e396f2fa 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;
}