summaryrefslogtreecommitdiff
path: root/mm/zsmalloc.c
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-09-17 12:01:05 +0200
committerChristian Brauner <brauner@kernel.org>2025-09-19 14:26:14 +0200
commit7914f15c5e45ea6c76f2b3272ff39d8fe67b13f5 (patch)
tree32385a82110d012928536d7787b024add8818f63 /mm/zsmalloc.c
parent885fc8ac0a4dc70f5d87b80b0977292870e35c60 (diff)
parent38f4885088fc5ad41b8b0a2a2cfc73d01e709e5c (diff)
Merge branch 'no-rebase-mnt_ns_tree_remove'
Bring in the fix for removing a mount namespace from the mount namespace rbtree and list. Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'mm/zsmalloc.c')
-rw-r--r--mm/zsmalloc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 2c5e56a65354..805a10b41266 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -2246,9 +2246,16 @@ EXPORT_SYMBOL_GPL(zs_destroy_pool);
static int __init zs_init(void)
{
+ int rc __maybe_unused;
+
#ifdef CONFIG_ZPOOL
zpool_register_driver(&zs_zpool_driver);
#endif
+#ifdef CONFIG_COMPACTION
+ rc = set_movable_ops(&zsmalloc_mops, PGTY_zsmalloc);
+ if (rc)
+ return rc;
+#endif
zs_stat_init();
return 0;
}
@@ -2258,6 +2265,9 @@ static void __exit zs_exit(void)
#ifdef CONFIG_ZPOOL
zpool_unregister_driver(&zs_zpool_driver);
#endif
+#ifdef CONFIG_COMPACTION
+ set_movable_ops(NULL, PGTY_zsmalloc);
+#endif
zs_stat_exit();
}