]> Pileus Git - ~andy/linux/blobdiff - include/linux/mm.h
mm: fix slab->page flags corruption
[~andy/linux] / include / linux / mm.h
index aa20bafa40f627f646e75f481d84f0da9098b640..ce26716238c3632ba95d909bf69e1e4d4bc91da2 100644 (file)
@@ -321,6 +321,7 @@ static inline int is_vmalloc_or_module_addr(const void *x)
 static inline void compound_lock(struct page *page)
 {
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
+       VM_BUG_ON(PageSlab(page));
        bit_spin_lock(PG_compound_lock, &page->flags);
 #endif
 }
@@ -328,6 +329,7 @@ static inline void compound_lock(struct page *page)
 static inline void compound_unlock(struct page *page)
 {
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
+       VM_BUG_ON(PageSlab(page));
        bit_spin_unlock(PG_compound_lock, &page->flags);
 #endif
 }