linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/z3fold:remove unneeded spinlock in z3fold_alloc
@ 2024-02-04 13:15 Zhongkun He
  2024-02-08  3:34 ` Johannes Weiner
  2024-02-21 22:23 ` Andrew Morton
  0 siblings, 2 replies; 5+ messages in thread
From: Zhongkun He @ 2024-02-04 13:15 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, Zhongkun He

The spinklock in z3fold_alloc() is used to protect page->lru,
but now it was removed in commit 'e774a7bc7f0ad', so remove
the spinlock too.

Signed-off-by: Zhongkun He <hezhongkun.hzk@bytedance.com>
---
 mm/z3fold.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/z3fold.c b/mm/z3fold.c
index 7f608c0667f3..58946cacbfbb 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -1068,9 +1068,7 @@ static int z3fold_alloc(struct z3fold_pool *pool, size_t size, gfp_t gfp,
 	add_to_unbuddied(pool, zhdr);
 
 headless:
-	spin_lock(&pool->lock);
 	*handle = encode_handle(zhdr, bud);
-	spin_unlock(&pool->lock);
 	if (bud != HEADLESS)
 		z3fold_page_unlock(zhdr);
 
-- 
2.20.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-22  2:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 13:15 [PATCH] mm/z3fold:remove unneeded spinlock in z3fold_alloc Zhongkun He
2024-02-08  3:34 ` Johannes Weiner
2024-02-08 17:29   ` [External] " Zhongkun He
2024-02-21 22:23 ` Andrew Morton
2024-02-22  2:40   ` [External] " Zhongkun He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox