From: Jens Axboe <jens.axboe@oracle.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <htejun@gmail.com>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Don't blatt first element of prv in sg_chain()
Date: Fri, 11 Jan 2008 10:15:03 +0100 [thread overview]
Message-ID: <20080111091503.GN6258@kernel.dk> (raw)
In-Reply-To: <200801071538.43371.rusty@rustcorp.com.au>
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
prev parent reply other threads:[~2008-01-11 9:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-07 4:38 [PATCH] Don't blatt first element of prv in sg_chain() Rusty Russell
2008-01-07 5:02 ` Tejun Heo
2008-01-11 9:15 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080111091503.GN6258@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=htejun@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).