linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: fix build of split ptlock code
@ 2013-12-20 22:28 Olof Johansson
  2013-12-21 16:36 ` Kirill A. Shutemov
  0 siblings, 1 reply; 2+ messages in thread
From: Olof Johansson @ 2013-12-20 22:28 UTC (permalink / raw)
  To: torvalds
  Cc: linux-kernel, linux-mm, akpm, Olof Johansson, Kirill A. Shutemov,
	Hugh Dickins

Commit 597d795a2a78 ('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: 597d795a2a78 ('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>
---
 mm/memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index b6e211b..6768ce9 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -4271,7 +4271,7 @@ void copy_user_huge_page(struct page *dst, struct page *src,
 }
 #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */
 
-#if ALLOC_SPLIT_PTLOCKS
+#if USE_SPLIT_PTE_PTLOCKS && ALLOC_SPLIT_PTLOCKS
 bool ptlock_alloc(struct page *page)
 {
 	spinlock_t *ptl;
-- 
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm: fix build of split ptlock code
  2013-12-20 22:28 [PATCH] mm: fix build of split ptlock code Olof Johansson
@ 2013-12-21 16:36 ` Kirill A. Shutemov
  0 siblings, 0 replies; 2+ messages in thread
From: Kirill A. Shutemov @ 2013-12-21 16:36 UTC (permalink / raw)
  To: Olof Johansson
  Cc: torvalds, linux-kernel, linux-mm, akpm, Kirill A. Shutemov,
	Hugh Dickins

On Fri, Dec 20, 2013 at 02:28:05PM -0800, Olof Johansson wrote:
> Commit 597d795a2a78 ('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: 597d795a2a78 ('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>

Sorry, for that.

Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

-- 
 Kirill A. Shutemov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-22 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-20 22:28 [PATCH] mm: fix build of split ptlock code Olof Johansson
2013-12-21 16:36 ` Kirill A. Shutemov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).