Last active
August 14, 2018 18:48
-
-
Save tpruzina/6fb1c1788d1eb13e9f2567a485db09ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c | |
index 156ed8154af8..9df07402d801 100644 | |
--- a/arch/x86/mm/init.c | |
+++ b/arch/x86/mm/init.c | |
@@ -916,9 +916,11 @@ void update_cache_mode_entry(unsigned entry, enum page_cache_mode cache) | |
unsigned long max_swapfile_size(void) | |
{ | |
- unsigned long pages; | |
+ unsigned long pages = 0UL; | |
- pages = generic_max_swapfile_size(); | |
+#ifdef CONFIG_SWAP | |
+ pages = generic_max_swapfile_size(); | |
+#endif | |
if (boot_cpu_has_bug(X86_BUG_L1TF)) { | |
/* Limit the swap file size to MAX_PA/2 for L1TF workaround */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment