projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b776eb
)
[SG] Add debug check for page alignment
author
Jens Axboe
<jens.axboe@oracle.com>
Tue, 23 Oct 2007 18:35:58 +0000
(20:35 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Tue, 23 Oct 2007 18:35:58 +0000
(20:35 +0200)
Suggested by Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
include/linux/scatterlist.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/scatterlist.h
b/include/linux/scatterlist.h
index 42daf5e1526592e351fdcafe464565a5d272682a..df7ddcee7c4bdcef4ea5f80ed99c8719c025fc27 100644
(file)
--- 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