On Thu, 2 Jun 2016, Kirill A. Shutemov wrote: > On Thu, Jun 02, 2016 at 05:21:41PM +0200, Gerald Schaefer wrote: > > > > The following quick hack fixed the issue: > > > > diff --git a/mm/swap_state.c b/mm/swap_state.c > > index 0d457e7..c99463a 100644 > > --- a/mm/swap_state.c > > +++ b/mm/swap_state.c > > @@ -252,7 +252,10 @@ static inline void free_swap_cache(struct page *page) > > void free_page_and_swap_cache(struct page *page) > > { > > free_swap_cache(page); > > - put_page(page); > > + if (is_huge_zero_page(page)) > > + put_huge_zero_page(); > > + else > > + put_page(page); > > } > > > > /* > > The fix looks good to me. Is there a good reason why the refcount of the huge_zero_page is huge_zero_refcount, instead of the refcount of the huge_zero_page? Wouldn't the latter avoid such is_huge_zero_page() special-casing? Hugh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>