mm: make sure isolate_lru_page() is never called for tail page
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Thu, 14 Jan 2016 23:21:43 +0000 (15:21 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Jan 2016 00:00:49 +0000 (16:00 -0800)
The VM_BUG_ON_PAGE() would catch such cases if any still exists.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmscan.c

index bb0cbd4c9f01f913a4779fd6ab3daf8bba4b207c..108bd119f2f6ba3f55247d7136684f937243b0c8 100644 (file)
@@ -1426,6 +1426,7 @@ int isolate_lru_page(struct page *page)
        int ret = -EBUSY;
 
        VM_BUG_ON_PAGE(!page_count(page), page);
+       VM_BUG_ON_PAGE(PageTail(page), page);
 
        if (PageLRU(page)) {
                struct zone *zone = page_zone(page);