diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-17 07:02:33 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-17 07:02:33 -0400 |
commit | 60573b874b03d22678614ca1e73f6b15c1b53b40 (patch) | |
tree | eab565cf0b353bcdf7eafb47c5e798318c7c54fd /block/ll_rw_blk.c | |
parent | bdb02504f473be6a785741093913ea2acd05626f (diff) |
[BLOCK] Clear sg entry before filling in blk_rq_map_sg()
The memset() of the sg entry was originally removed, because it could
overwrite a chain pointer. But it's quite OK to memset() it when we know
it's a valid entry, since it can't contain a chain pointer.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r-- | block/ll_rw_blk.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 9eabac95fbe0..1014d349a386 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -1352,6 +1352,7 @@ new_segment: | |||
1352 | sg = next_sg; | 1352 | sg = next_sg; |
1353 | next_sg = sg_next(sg); | 1353 | next_sg = sg_next(sg); |
1354 | 1354 | ||
1355 | memset(sg, 0, sizeof(*sg)); | ||
1355 | sg->page = bvec->bv_page; | 1356 | sg->page = bvec->bv_page; |
1356 | sg->length = nbytes; | 1357 | sg->length = nbytes; |
1357 | sg->offset = bvec->bv_offset; | 1358 | sg->offset = bvec->bv_offset; |