Skip to contentSkip to conversation

mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n

PATCH New [email protected] 1 participant 1 message Aug 30, 2019

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 2/7 mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n

From: Andrew Morton <[email protected]>
Subject: mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n

Fixes 701d678599d0c1 ("mm/zsmalloc.c: fix race condition in zs_destroy_pool")
Cc Sergey Senozhatsky <[email protected]>
Cc Henry Burns <[email protected]>
Cc Minchan Kim <[email protected]>
Cc Shakeel Butt <[email protected]>
Cc Jonathan Adams <[email protected]>

---

 mm/zsmalloc.c |    2 ++
 1 file changed, 2 insertions(+)
mm/zsmalloc.c renamed from mm/zsmalloc.c~mm-zsmallocc-fix-build-when-config_compaction=n +2 -0
@@ -2412,7 +2412,9 @@ struct zs_pool *zs_create_pool(const cha
 	if (!pool->name)
 		goto err;
 
+#ifdef CONFIG_COMPACTION
 	init_waitqueue_head(&pool->migration_wait);
+#endif
 
 	if (create_cache(pool))
 		goto err;

_