Commit 1e44290e authored by Liu Shixin's avatar Liu Shixin Committed by Ma Wupeng
Browse files

mm/zswap: remove _init in the initialization

hulk inclusion
category: bugfix
bugzilla: 187468, https://gitee.com/openeuler/kernel/issues/I61HSG



--------------------------------

As zswap can be init after system startup, the __init label should be
removed.

Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
parent 699bb9e8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -266,13 +266,13 @@ static void zswap_update_total_size(void)
**********************************/
static struct kmem_cache *zswap_entry_cache;

static int __init zswap_entry_cache_create(void)
static int zswap_entry_cache_create(void)
{
	zswap_entry_cache = KMEM_CACHE(zswap_entry, 0);
	return zswap_entry_cache == NULL;
}

static void __init zswap_entry_cache_destroy(void)
static void zswap_entry_cache_destroy(void)
{
	kmem_cache_destroy(zswap_entry_cache);
}
@@ -653,7 +653,7 @@ static struct zswap_pool *zswap_pool_create(char *type, char *compressor)
	return NULL;
}

static __init struct zswap_pool *__zswap_pool_create_fallback(void)
static struct zswap_pool *__zswap_pool_create_fallback(void)
{
	bool has_comp, has_zpool;

@@ -1409,7 +1409,7 @@ static struct frontswap_ops zswap_frontswap_ops = {

static struct dentry *zswap_debugfs_root;

static int __init zswap_debugfs_init(void)
static int zswap_debugfs_init(void)
{
	if (!debugfs_initialized())
		return -ENODEV;
@@ -1445,7 +1445,7 @@ static void __exit zswap_debugfs_exit(void)
	debugfs_remove_recursive(zswap_debugfs_root);
}
#else
static int __init zswap_debugfs_init(void)
static int zswap_debugfs_init(void)
{
	return 0;
}