diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/ll_rw_blk.c | 8 |
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: | |||
1354 | else | 1354 | else |
1355 | sg = sg_next(sg); | 1355 | sg = sg_next(sg); |
1356 | 1356 | ||
1357 | memset(sg, 0, sizeof(*sg)); | 1357 | sg_dma_len(sg) = 0; |
1358 | sg->page = bvec->bv_page; | 1358 | sg_dma_address(sg) = 0; |
1359 | sg_set_page(sg, bvec->bv_page); | ||
1359 | sg->length = nbytes; | 1360 | sg->length = nbytes; |
1360 | sg->offset = bvec->bv_offset; | 1361 | sg->offset = bvec->bv_offset; |
1361 | nsegs++; | 1362 | nsegs++; |
@@ -1363,6 +1364,9 @@ new_segment: | |||
1363 | bvprv = bvec; | 1364 | bvprv = bvec; |
1364 | } /* segments in rq */ | 1365 | } /* segments in rq */ |
1365 | 1366 | ||
1367 | if (sg) | ||
1368 | __sg_mark_end(sg); | ||
1369 | |||
1366 | return nsegs; | 1370 | return nsegs; |
1367 | } | 1371 | } |
1368 | 1372 | ||