Make sg_chain() able to chain "live" sg arrays

Remove the end bit at the end of the first chain.  SCSI gets away with
it because it does sg_init_table on the whole table including the
padding element used for chaining.  If you've filled the array
already, it doesn't work.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 include/linux/scatterlist.h |    4 ++++
 1 file changed, 4 insertions(+)

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,6 +188,10 @@ static inline void sg_chain(struct scatt
 	BUG();
 #endif
 
+	/* Clear end bit at end of prv */
+	if (prv_nents > 1)
+		prv[prv_nents - 2].page_link &= ~0x02;
+
 	/*
 	 * offset and length are unused for chain entry.  Clear them.
 	 */
