zsmalloc: cleanup headers includes
authorSergey Senozhatsky <senozhatsky@chromium.org>
Tue, 25 Mar 2025 08:04:16 +0000 (17:04 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 May 2025 00:48:16 +0000 (17:48 -0700)
Remove unused headers includes from zsmalloc and move pagemap.h and
migrate.h includes into zpdesc header.

Link: https://lkml.kernel.org/r/20250325080427.3449359-1-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/zpdesc.h
mm/zsmalloc.c

index fa47fece22372e9a283ec2f7b8aba30b9904c6dd..57e7a4d6c6caf5adc290c50476c1ea6195bcdb6d 100644 (file)
@@ -7,6 +7,9 @@
 #ifndef __MM_ZPDESC_H__
 #define __MM_ZPDESC_H__
 
+#include <linux/migrate.h>
+#include <linux/pagemap.h>
+
 /*
  * struct zpdesc -     Memory descriptor for zpool memory.
  * @flags:             Page flags, mostly unused by zsmalloc.
index 513b08c7c941345b6f48d473929207476773c8dc..999b513c7fdff040c8755709918d756a8ef5b4bb 100644 (file)
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
-#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/highmem.h>
 #include <linux/string.h>
 #include <linux/slab.h>
-#include <linux/pgtable.h>
-#include <asm/tlbflush.h>
-#include <linux/cpumask.h>
-#include <linux/cpu.h>
-#include <linux/vmalloc.h>
-#include <linux/preempt.h>
 #include <linux/spinlock.h>
 #include <linux/sprintf.h>
 #include <linux/shrinker.h>
 #include <linux/debugfs.h>
 #include <linux/zsmalloc.h>
 #include <linux/zpool.h>
-#include <linux/migrate.h>
-#include <linux/wait.h>
-#include <linux/pagemap.h>
 #include <linux/fs.h>
-#include <linux/local_lock.h>
+#include <linux/workqueue.h>
 #include "zpdesc.h"
 
 #define ZSPAGE_MAGIC   0x58