Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70937
b: refs/heads/master
c: ba95184
h: refs/heads/master
i:
  70935: b12db9a
v: v3
  • Loading branch information
Jens Axboe committed Oct 17, 2007
1 parent c0d2ed7 commit 084e66f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a3bec5c5aea0da263111c4d8f8eabc1f8560d7bf
refs/heads/master: ba951841ceb7fa5b06ad48caa5270cc2ae17941e
10 changes: 6 additions & 4 deletions trunk/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,8 +1322,8 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
struct scatterlist *sglist)
{
struct bio_vec *bvec, *bvprv;
struct scatterlist *next_sg, *sg;
struct req_iterator iter;
struct scatterlist *sg;
int nsegs, cluster;

nsegs = 0;
Expand All @@ -1333,7 +1333,7 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
* for each bio in rq
*/
bvprv = NULL;
sg = next_sg = &sglist[0];
sg = NULL;
rq_for_each_segment(bvec, rq, iter) {
int nbytes = bvec->bv_len;

Expand All @@ -1349,8 +1349,10 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
sg->length += nbytes;
} else {
new_segment:
sg = next_sg;
next_sg = sg_next(sg);
if (!sg)
sg = sglist;
else
sg = sg_next(sg);

memset(sg, 0, sizeof(*sg));
sg->page = bvec->bv_page;
Expand Down

0 comments on commit 084e66f

Please sign in to comment.