Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=73fd546aa75e9db02526bf304d4f736c4ec82b4b Commit: 73fd546aa75e9db02526bf304d4f736c4ec82b4b Parent: 2a397e82c7db18019e408f953dd58dc1963a328c Author: Jens Axboe <[EMAIL PROTECTED]> AuthorDate: Fri Oct 26 09:32:16 2007 +0200 Committer: Jens Axboe <[EMAIL PROTECTED]> CommitDate: Mon Oct 29 09:18:03 2007 +0100
SG: clear termination bit in sg_chain() Since we are using the last entry in the list, clear any possible termination bit that may have already been set. Pointed out by Rusty. Signed-off-by: Jens Axboe <[EMAIL PROTECTED]> --- include/linux/scatterlist.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 4571231..b2ec842 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h @@ -179,7 +179,11 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, #ifndef ARCH_HAS_SG_CHAIN BUG(); #endif - prv[prv_nents - 1].page_link = (unsigned long) sgl | 0x01; + /* + * Set lowest bit to indicate a link pointer, and make sure to clear + * the termination bit if it happens to be set. + */ + prv[prv_nents - 1].page_link = ((unsigned long) sgl | 0x01) & ~0x02; } /** - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html