From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx152.postini.com [74.125.245.152]) by kanga.kvack.org (Postfix) with SMTP id 2DF276B000C for ; Mon, 28 Jan 2013 04:23:37 -0500 (EST) From: "Kirill A. Shutemov" Subject: [PATCH, RFC 08/16] thp, mm: locking tail page is a bug Date: Mon, 28 Jan 2013 11:24:20 +0200 Message-Id: <1359365068-10147-9-git-send-email-kirill.shutemov@linux.intel.com> In-Reply-To: <1359365068-10147-1-git-send-email-kirill.shutemov@linux.intel.com> References: <1359365068-10147-1-git-send-email-kirill.shutemov@linux.intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: Andrea Arcangeli , Andrew Morton , Al Viro Cc: Wu Fengguang , Jan Kara , Mel Gorman , linux-mm@kvack.org, Andi Kleen , Matthew Wilcox , "Kirill A. Shutemov" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" From: "Kirill A. Shutemov" Signed-off-by: Kirill A. Shutemov --- mm/filemap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/filemap.c b/mm/filemap.c index a4b4fd5..f59eaa1 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -665,6 +665,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); } @@ -674,6 +675,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: email@kvack.org