Skip to content

Commit 40b64ac

Browse files
olofjtorvalds
authored andcommitted
mm: fix build of split ptlock code
Commit 597d795 ('mm: do not allocate page->ptl dynamically, if spinlock_t fits to long') restructures some allocators that are compiled even if USE_SPLIT_PTLOCKS arn't used. It results in compilation failure: mm/memory.c:4282:6: error: 'struct page' has no member named 'ptl' mm/memory.c:4288:12: error: 'struct page' has no member named 'ptl' Add in the missing ifdef. Fixes: 597d795 ('mm: do not allocate page->ptl dynamically, if spinlock_t fits to long') Signed-off-by: Olof Johansson <olof@lixom.net> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 4773ef2 commit 40b64ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4271,7 +4271,7 @@ void copy_user_huge_page(struct page *dst, struct page *src,
42714271
}
42724272
#endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */
42734273

4274-
#if ALLOC_SPLIT_PTLOCKS
4274+
#if USE_SPLIT_PTE_PTLOCKS && ALLOC_SPLIT_PTLOCKS
42754275
bool ptlock_alloc(struct page *page)
42764276
{
42774277
spinlock_t *ptl;

0 commit comments

Comments
 (0)