diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/huge_memory.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index b6facc35e893..915809b16edf 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -487,7 +487,15 @@ static int __init hugepage_init(void) int err; #ifdef CONFIG_SYSFS static struct kobject *hugepage_kobj; +#endif + err = -EINVAL; + if (!has_transparent_hugepage()) { + transparent_hugepage_flags = 0; + goto out; + } + +#ifdef CONFIG_SYSFS err = -ENOMEM; hugepage_kobj = kobject_create_and_add("transparent_hugepage", mm_kobj); if (unlikely(!hugepage_kobj)) { |