Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=de26103de56a0c482ad21296eae9b06deefc8e62 Commit: de26103de56a0c482ad21296eae9b06deefc8e62 Parent: 0b776eb5426752d4e53354ac89e3710d857e09a7 Author: Jens Axboe <[EMAIL PROTECTED]> AuthorDate: Tue Oct 23 20:35:58 2007 +0200 Committer: Jens Axboe <[EMAIL PROTECTED]> CommitDate: Tue Oct 23 20:35:58 2007 +0200
[SG] Add debug check for page alignment Suggested by Boaz Harrosh <[EMAIL PROTECTED]> Signed-off-by: Jens Axboe <[EMAIL PROTECTED]> --- include/linux/scatterlist.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 42daf5e..df7ddce 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h @@ -41,6 +41,11 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page) { unsigned long page_link = sg->page_link & 0x3; + /* + * In order for the low bit stealing approach to work, pages + * must be aligned at a 32-bit boundary as a minimum. + */ + BUG_ON((unsigned long) page & 0x03); #ifdef CONFIG_DEBUG_SG BUG_ON(sg->sg_magic != SG_MAGIC); #endif - 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