[PATCH] Don't blatt first element of prv in sg_chain()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>

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
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux