Re: [PATCH] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-01 Thread Andrew Morton
On Mon, 1 Jul 2019 14:23:03 -0700 Henry Burns wrote: > __SetPageMovable() expects it's page to be locked, but z3fold.c doesn't > lock the page. So this triggers the VM_BUG_ON_PAGE(!PageLocked(page), page) in __SetPageMovable(), yes? > Following zsmalloc.c's example we call trylock_page() and >

[PATCH] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-01 Thread Henry Burns
__SetPageMovable() expects it's page to be locked, but z3fold.c doesn't lock the page. Following zsmalloc.c's example we call trylock_page() and unlock_page(). Also makes z3fold_page_migrate() assert that newpage is passed in locked, as documentation. Signed-off-by: Henry Burns --- mm/z3fold.c |