mm: make sure isolate_lru_page() is never called for tail page

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>
This commit is contained in:
Kirill A. Shutemov 2016-01-14 15:21:43 -08:00 committed by Linus Torvalds
parent 0eb77e9880
commit bb5b858976
1 changed files with 1 additions and 0 deletions

View File

@ -1426,6 +1426,7 @@ int isolate_lru_page(struct page *page)
int ret = -EBUSY; int ret = -EBUSY;
VM_BUG_ON_PAGE(!page_count(page), page); VM_BUG_ON_PAGE(!page_count(page), page);
VM_BUG_ON_PAGE(PageTail(page), page);
if (PageLRU(page)) { if (PageLRU(page)) {
struct zone *zone = page_zone(page); struct zone *zone = page_zone(page);