Thread (120 messages) 120 messages, 9 authors, 2013-04-05

[PATCHv2, RFC 10/30] thp, mm: locking tail page is a bug

From: Kirill A. Shutemov <hidden>
Date: 2013-03-14 17:50:15
Also in: linux-fsdevel, lkml
Subsystem: memory management, page cache, the rest · Maintainers: Andrew Morton, Matthew Wilcox, Jan Kara, Linus Torvalds

From: "Kirill A. Shutemov" <redacted>

Signed-off-by: Kirill A. Shutemov <redacted>
---
 mm/filemap.c |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/mm/filemap.c b/mm/filemap.c
index 0ff3403..38fdc92 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -669,6 +669,7 @@ void __lock_page(struct page *page)
 {
 	DEFINE_WAIT_BIT(wait, &page->flags, PG_locked);
 
+	VM_BUG_ON(PageTail(page));
 	__wait_on_bit_lock(page_waitqueue(page), &wait, sleep_on_page,
 							TASK_UNINTERRUPTIBLE);
 }
@@ -678,6 +679,7 @@ int __lock_page_killable(struct page *page)
 {
 	DEFINE_WAIT_BIT(wait, &page->flags, PG_locked);
 
+	VM_BUG_ON(PageTail(page));
 	return __wait_on_bit_lock(page_waitqueue(page), &wait,
 					sleep_on_page_killable, TASK_KILLABLE);
 }
-- 
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help