diff mbox series

[RFC,18/25] mm/zsmalloc: convert free_handles() to use zsdesc

Message ID 20230220132218.546369-19-42.hyeyoo@gmail.com (mailing list archive)
State New
Headers show
Series mm/zsmalloc: Split zsdesc from struct page | expand

Commit Message

Hyeonggon Yoo Feb. 20, 2023, 1:22 p.m. UTC
Convert free_handles() to use zsdesc.

Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
---
 mm/zsmalloc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index dbc404045487..b58821b3494b 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1123,14 +1123,14 @@  static void free_handles(struct zs_pool *pool, struct size_class *class,
 		struct zspage *zspage)
 {
 	int obj_idx = 0;
-	struct page *page = get_first_page(zspage);
+	struct zsdesc *zsdesc = get_first_zsdesc(zspage);
 	unsigned long handle;
 
 	while (1) {
-		handle = find_deferred_handle_obj(class, page_zsdesc(page), &obj_idx);
+		handle = find_deferred_handle_obj(class, zsdesc, &obj_idx);
 		if (!handle) {
-			page = get_next_page(page);
-			if (!page)
+			zsdesc = get_next_zsdesc(zsdesc);
+			if (!zsdesc)
 				break;
 			obj_idx = 0;
 			continue;