lkml.org 
[lkml]   [2008]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Don't blatt first element of prv in sg_chain()
On Mon, Jan 07 2008, Rusty Russell wrote:
> I realize that sg chaining is a ploy to make the rest of the kernel
> devs feel the pain of the SCSI subsystem. But this was a little
> unsubtle.
>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
>
> diff -r b3aec596b841 include/linux/scatterlist.h
> --- a/include/linux/scatterlist.h Mon Jan 07 12:43:56 2008 +1100
> +++ b/include/linux/scatterlist.h Mon Jan 07 15:01:51 2008 +1100
> @@ -188,8 +188,8 @@ static inline void sg_chain(struct scatt
> /*
> * offset and length are unused for chain entry. Clear them.
> */
> - prv->offset = 0;
> - prv->length = 0;
> + prv[prv_nents - 1].offset = 0;
> + prv[prv_nents - 1].length = 0;
>
> /*
> * Set lowest bit to indicate a link pointer, and make sure to clear

Dang, I should have caught that. Thanks Rusty...

--
Jens Axboe



\
 
 \ /
  Last update: 2008-01-11 10:17    [W:0.031 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site