<zengjx95@xxxxxxxxx> 于2022年7月20日周三 14:58写道: > > From: Zeng Jingxiang <linuszeng@xxxxxxxxxxx> > > z3fold_page_lock() will lock zhdr->page_lock > 1630 z3fold_page_lock(zhdr); > > return without unlocking zhdr->page_lock > 1634 if (kref_put(&zhdr->refcount, release_z3fold_page_locked)) > 1635 return; > > Signed-off-by: Zeng Jingxiang <linuszeng@xxxxxxxxxxx> > --- > mm/z3fold.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/mm/z3fold.c b/mm/z3fold.c > index f41f8b0d9e9a..03785832ad47 100644 > --- a/mm/z3fold.c > +++ b/mm/z3fold.c > @@ -1632,13 +1632,14 @@ static void z3fold_page_putback(struct page *page) > list_del_init(&zhdr->buddy); > INIT_LIST_HEAD(&page->lru); > if (kref_put(&zhdr->refcount, release_z3fold_page_locked)) > - return; > + goto ret; > spin_lock(&pool->lock); > list_add(&page->lru, &pool->lru); > spin_unlock(&pool->lock); > if (list_empty(&zhdr->buddy)) > add_to_unbuddied(pool, zhdr); > clear_bit(PAGE_CLAIMED, &page->private); > +ret: > z3fold_page_unlock(zhdr); > } > > -- > 2.27.0 > Sorry, I just misunderstood the code logic, please ignore this patch.