Skip to content

Commit

Permalink
Don't blatt first element of prv in sg_chain()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rusty Russell authored and Jens Axboe committed Jan 11, 2008
1 parent 88fb61e commit b801a1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/scatterlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b801a1e

Please sign in to comment.