mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 17:40:53 +07:00
mm/zswap: add __init to some functions in zswap
zswap_cpu_init/zswap_comp_exit/zswap_entry_cache_create is only called by __init init_zswap() Signed-off-by: Mahendran Ganesh <opensource.ganesh@gmail.com> Cc: Seth Jennings <sjennings@variantweb.net> Cc: Dan Streetman <ddstreet@ieee.org> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
083914eab9
commit
dd01d7d89a
@ -149,7 +149,7 @@ static int __init zswap_comp_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void zswap_comp_exit(void)
|
static void __init zswap_comp_exit(void)
|
||||||
{
|
{
|
||||||
/* free percpu transforms */
|
/* free percpu transforms */
|
||||||
if (zswap_comp_pcpu_tfms)
|
if (zswap_comp_pcpu_tfms)
|
||||||
@ -206,7 +206,7 @@ static struct zswap_tree *zswap_trees[MAX_SWAPFILES];
|
|||||||
**********************************/
|
**********************************/
|
||||||
static struct kmem_cache *zswap_entry_cache;
|
static struct kmem_cache *zswap_entry_cache;
|
||||||
|
|
||||||
static int zswap_entry_cache_create(void)
|
static int __init zswap_entry_cache_create(void)
|
||||||
{
|
{
|
||||||
zswap_entry_cache = KMEM_CACHE(zswap_entry, 0);
|
zswap_entry_cache = KMEM_CACHE(zswap_entry, 0);
|
||||||
return zswap_entry_cache == NULL;
|
return zswap_entry_cache == NULL;
|
||||||
@ -389,7 +389,7 @@ static struct notifier_block zswap_cpu_notifier_block = {
|
|||||||
.notifier_call = zswap_cpu_notifier
|
.notifier_call = zswap_cpu_notifier
|
||||||
};
|
};
|
||||||
|
|
||||||
static int zswap_cpu_init(void)
|
static int __init zswap_cpu_init(void)
|
||||||
{
|
{
|
||||||
unsigned long cpu;
|
unsigned long cpu;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user