lkml.org 
[lkml]   [2020]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v20 04/20] mm/thp: use head for head page in lru_add_page_tail
On Fri, Oct 30, 2020 at 10:46:54AM +0800, Alex Shi wrote:
> -static void lru_add_page_tail(struct page *page, struct page *page_tail,
> +static void lru_add_page_tail(struct page *head, struct page *tail,
> struct lruvec *lruvec, struct list_head *list)
> {
> - VM_BUG_ON_PAGE(!PageHead(page), page);
> - VM_BUG_ON_PAGE(PageCompound(page_tail), page);
> - VM_BUG_ON_PAGE(PageLRU(page_tail), page);
> + VM_BUG_ON_PAGE(!PageHead(head), head);
> + VM_BUG_ON_PAGE(PageCompound(tail), head);
> + VM_BUG_ON_PAGE(PageLRU(tail), head);

These last two should surely have been
VM_BUG_ON_PAGE(PageCompound(tail), tail);
VM_BUG_ON_PAGE(PageLRU(tail), tail);

Also, what do people think about converting these to VM_BUG_ON_PGFLAGS?

Either way:

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

\
 
 \ /
  Last update: 2020-11-02 17:07    [W:0.075 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site