summaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorJiri Kosina2010-09-24 14:03:37 +0200
committerJiri Kosina2010-09-24 14:03:37 +0200
commit73e6d6c6467771838c1fc6949e6768a12ed72464 (patch)
tree94dd60891869a0a275cd332c4e675cf0b101fcfa /mm/slab.c
parentHID: trivial formatting fix (diff)
parenthugetlb, rmap: add BUG_ON(!PageLocked) in hugetlb_add_anon_rmap() (diff)
downloadkernel-qcow2-linux-73e6d6c6467771838c1fc6949e6768a12ed72464.tar.gz
kernel-qcow2-linux-73e6d6c6467771838c1fc6949e6768a12ed72464.tar.xz
kernel-qcow2-linux-73e6d6c6467771838c1fc6949e6768a12ed72464.zip
Merge branch 'master' into upstream
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 88435fcc8387..fcae9815d3b3 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2330,8 +2330,8 @@ kmem_cache_create (const char *name, size_t size, size_t align,
}
#if FORCED_DEBUG && defined(CONFIG_DEBUG_PAGEALLOC)
if (size >= malloc_sizes[INDEX_L3 + 1].cs_size
- && cachep->obj_size > cache_line_size() && size < PAGE_SIZE) {
- cachep->obj_offset += PAGE_SIZE - size;
+ && cachep->obj_size > cache_line_size() && ALIGN(size, align) < PAGE_SIZE) {
+ cachep->obj_offset += PAGE_SIZE - ALIGN(size, align);
size = PAGE_SIZE;
}
#endif