summaryrefslogtreecommitdiffstats
path: root/include/linux/scatterlist.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-01-11 10:12:55 +0100
committerJens Axboe <jens.axboe@oracle.com>2008-01-11 10:12:55 +0100
commitb801a1e7dbca3f51d0a4b22a750ae257196002cb (patch)
tree8c6963d592cc34c9964c5760b57447c9ee4e48a5 /include/linux/scatterlist.h
parent88fb61e4ba263685a0d5b82c7e9cd6f22a9e6a9d (diff)
downloadlinux-b801a1e7dbca3f51d0a4b22a750ae257196002cb.tar.gz
linux-b801a1e7dbca3f51d0a4b22a750ae257196002cb.tar.bz2
linux-b801a1e7dbca3f51d0a4b22a750ae257196002cb.zip
Don't blatt first element of prv in sg_chain()
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> Acked-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/scatterlist.h')
-rw-r--r--include/linux/scatterlist.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index 416e000dfe81..e3ff21dbac53 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -191,8 +191,8 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
/*
* 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