diff options
author | Geert Uytterhoeven <[email protected]> | 2016-08-03 19:58:19 +0200 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2016-08-03 18:20:12 -0400 |
commit | 4620a06e4b3c5d076feb9a42ab43dce77c385358 (patch) | |
tree | 82ddf106f95965a6b70a987134f6e0c2da169cd7 /tools/perf/util/trace-event-scripting.c | |
parent | 25fd91dc72de6b0491b8cd298a079b9176c0c48e (diff) |
shmem: Fix link error if huge pages support is disabled
If CONFIG_TRANSPARENT_HUGE_PAGECACHE=n, HPAGE_PMD_NR evaluates to
BUILD_BUG_ON(), and may cause (e.g. with gcc 4.12):
mm/built-in.o: In function `shmem_alloc_hugepage':
shmem.c:(.text+0x17570): undefined reference to `__compiletime_assert_1365'
To fix this, move the assignment to hindex after the check for huge
pages support.
Fixes: 800d8c63b2e9 ("shmem: add huge pages support")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions