akpm@ wrote: > Subject: + thp-mm-locking-tail-page-is-a-bug.patch added to -mm tree > To: kirill.shutemov@xxxxxxxxxxxxxxx,dave.hansen@xxxxxxxxxxxxxxx > From: akpm@xxxxxxxxxxxxxxxxxxxx > Date: Wed, 17 Jul 2013 14:12:42 -0700 > > > The patch titled > Subject: thp, mm: locking tail page is a bug I forgot about trylock_page(). Andrew, could you fold diff below into the patch. Thanks. >From 88eafcb8dfae1e169f2ca165d30615cf55207cc0 Mon Sep 17 00:00:00 2001 From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> Date: Thu, 1 Aug 2013 14:26:08 +0300 Subject: [PATCH] trylock on tail page is a bug --- include/linux/pagemap.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index e3dea75..e8ca8cf 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -339,6 +339,7 @@ static inline void __clear_page_locked(struct page *page) static inline int trylock_page(struct page *page) { + VM_BUG_ON(PageTail(page)); return (likely(!test_and_set_bit_lock(PG_locked, &page->flags))); } -- Kirill A. Shutemov -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>