[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPp=jc_J7fO74ygbZJV0SqDQ3=Zj8j7VW+OAoo6wvcgAT-Y2pg@mail.gmail.com>
Date: Wed, 20 Jul 2022 15:05:30 +0800
From: jingxiang zeng <zengjx95@...il.com>
To: vitaly.wool@...sulko.com, linmiaohe@...wei.com,
akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Zeng Jingxiang <linuszeng@...cent.com>
Subject: Re: [PATCH] mm/z3fold: do not unlock in z3fold_page_putback()
<zengjx95@...il.com> 于2022年7月20日周三 14:58写道:
>
> From: Zeng Jingxiang <linuszeng@...cent.com>
>
> 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@...cent.com>
> ---
> 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.
Powered by blists - more mailing lists