>>>>> "Jens" == Jens Axboe <jens.axboe@oracle.com> writes: Jens> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Jens> --- Jens> block/ll_rw_blk.c | 8 ++++++-- Jens> 1 files changed, 6 insertions(+), 2 deletions(-) Jens> diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c Jens> index 8025d64..61c2e39 100644 Jens> --- a/block/ll_rw_blk.c Jens> +++ b/block/ll_rw_blk.c Jens> @@ -1354,8 +1354,9 @@ new_segment: Jens> else Jens> sg = sg_next(sg); Jens> - memset(sg, 0, sizeof(*sg)); Jens> - sg->page = bvec->bv_page; Jens> + sg_dma_len(sg) = 0; Jens> + sg_dma_address(sg) = 0; Why don't you call these something like sg_set_dma_len() and sg_set_dma_address() instead, to make it clear these set the values and don't read them? Jens> + sg_set_page(sg, bvec->bv_page); Esp since you have the sg_set_page() right below it. sg-> length = nbytes; sg-> offset = bvec->bv_offset; Jens> nsegs++; Jens> @@ -1363,6 +1364,9 @@ new_segment: Jens> bvprv = bvec; Jens> } /* segments in rq */ Jens> + if (sg) Jens> + __sg_mark_end(sg); Jens> + Jens> return nsegs; Jens> } Jens> -- Jens> 1.5.3.GIT Jens> - Jens> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Jens> the body of a message to majordomo@vger.kernel.org Jens> More majordomo info at http://vger.kernel.org/majordomo-info.html Jens> Please read the FAQ at http://www.tux.org/lkml/ Jens> !DSPAM:471ce899205391598813817! -
| Greg Kroah-Hartman | [PATCH 002/196] Chinese: rephrase English introduction in HOWTO |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Andrew Morton | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
| Greg KH | Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching |
git: | |
| Gerrit Renker | [PATCH 03/37] dccp: List management for new feature negotiation |
| Arjan van de Ven | Re: [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Jarek Poplawski | Re: [BUG] New Kernel Bugs |
