summaryrefslogtreecommitdiff
path: root/mm/z3fold.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2021-06-30 18:50:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-06-30 20:47:29 -0700
commit28473d91ff7f686d58047ff55f2fa98ab59114a4 (patch)
tree6f35d2d9d6e7252c0e38ce210ffea30387b61c71 /mm/z3fold.c
parentdac0d1cfda56472378d330b1b76b9973557a7b1d (diff)
downloadlinux-rpi-28473d91ff7f686d58047ff55f2fa98ab59114a4.tar.gz
linux-rpi-28473d91ff7f686d58047ff55f2fa98ab59114a4.tar.bz2
linux-rpi-28473d91ff7f686d58047ff55f2fa98ab59114a4.zip
mm/z3fold: use release_z3fold_page_locked() to release locked z3fold page
We should use release_z3fold_page_locked() to release z3fold page when it's locked, although it looks harmless to use release_z3fold_page() now. Link: https://lkml.kernel.org/r/20210619093151.1492174-7-linmiaohe@huawei.com Fixes: dcf5aedb24f8 ("z3fold: stricter locking and more careful reclaim") Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Vitaly Wool <vitaly.wool@konsulko.com> Cc: Hillf Danton <hdanton@sina.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/z3fold.c')
-rw-r--r--mm/z3fold.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/z3fold.c b/mm/z3fold.c
index f34130ff093d..a1bc021434a1 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -1370,7 +1370,7 @@ static int z3fold_reclaim_page(struct z3fold_pool *pool, unsigned int retries)
if (zhdr->foreign_handles ||
test_and_set_bit(PAGE_CLAIMED, &page->private)) {
if (kref_put(&zhdr->refcount,
- release_z3fold_page))
+ release_z3fold_page_locked))
atomic64_dec(&pool->pages_nr);
else
z3fold_page_unlock(zhdr);