summaryrefslogtreecommitdiffstats
path: root/mm/z3fold.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-04-28 23:16:06 -0700
committerakpm <akpm@linux-foundation.org>2022-04-28 23:16:06 -0700
commit52fb90cc19197f831e5e76e994ae82a29532d89f (patch)
treef32ffb26ebc403269c3c6d6ecfb0448e7299ed44 /mm/z3fold.c
parent5e36c25b2c1aeee16df21d5e4fef22d7ff2b80cf (diff)
downloadlinux-52fb90cc19197f831e5e76e994ae82a29532d89f.tar.bz2
mm/z3fold: remove redundant list_del_init of zhdr->buddy in z3fold_free
do_compact_page() will do list_del_init(&zhdr->buddy) for us. Remove this extra one to save some possible cpu cycles. Link: https://lkml.kernel.org/r/20220308134311.59086-8-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Vitaly Wool <vitaly.wool@konsulko.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/z3fold.c')
-rw-r--r--mm/z3fold.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/mm/z3fold.c b/mm/z3fold.c
index 18a697f6fe32..867c590df027 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -1244,9 +1244,6 @@ static void z3fold_free(struct z3fold_pool *pool, unsigned long handle)
return;
}
if (zhdr->cpu < 0 || !cpu_online(zhdr->cpu)) {
- spin_lock(&pool->lock);
- list_del_init(&zhdr->buddy);
- spin_unlock(&pool->lock);
zhdr->cpu = -1;
kref_get(&zhdr->refcount);
clear_bit(PAGE_CLAIMED, &page->private);