linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Don't blatt first element of prv in sg_chain()
@ 2008-01-07  4:38 Rusty Russell
  2008-01-07  5:02 ` Tejun Heo
  2008-01-11  9:15 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Rusty Russell @ 2008-01-07  4:38 UTC (permalink / raw)
  To: Tejun Heo; +Cc: James Bottomley, linux-scsi, linux-kernel, Jens Axboe

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-11  9:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).