Messages in this thread | | | Date | Mon, 2 Nov 2020 16:03:57 +0000 | From | Matthew Wilcox <> | Subject | Re: [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>
| |