diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-04 10:03:00 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-04 10:03:00 +0100 |
commit | 35ffc2a00fe3b8be8ccd9158a88595d9094a6269 (patch) | |
tree | d2e24caa0f5c84a71c2d52ac7f0f8cd2a91e77ee | |
parent | mm: only use bdev functions for CONFIG_BLOCK (diff) | |
download | rhel7-kernel-misery-master.tar.xz rhel7-kernel-misery-master.zip |
For CONFIG_SWAP=n configurations, generic_max_swapfile_size is not
compiled in, so conditionalize this statement.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | arch/x86/mm/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 43c77f4d4d1..b21a95b508b 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -817,7 +817,7 @@ unsigned long max_swapfile_size(void) { unsigned long pages; - pages = generic_max_swapfile_size(); + pages = IS_ENABLED(CONFIG_SWAP) ? generic_max_swapfile_size() : 0; if (boot_cpu_has_bug(X86_BUG_L1TF)) { /* Limit the swap file size to MAX_PA/2 for L1TF workaround */ |