]> Git Repo - linux.git/commit
mm/shmem: fix build without THP
authorHugh Dickins <[email protected]>
Tue, 21 Apr 2020 01:14:07 +0000 (18:14 -0700)
committerLinus Torvalds <[email protected]>
Tue, 21 Apr 2020 18:11:55 +0000 (11:11 -0700)
commit0783ac95b4a09a18e702c8359053762649b34c94
tree22621a2d886c9d2639e5f89b06ed9116f7608cf5
parent56df70a63ed5d989c1d36deee94cae14342be6e9
mm/shmem: fix build without THP

Some optimizers don't notice that shmem_punch_compound() is always true
(PageTransCompound() being false) without CONFIG_TRANSPARENT_HUGEPAGE==y.

Use IS_ENABLED to help them to avoid the BUILD_BUG inside HPAGE_PMD_NR.

Fixes: 71725ed10c40 ("mm: huge tmpfs: try to split_huge_page() when punching hole")
Reported-by: Randy Dunlap <[email protected]>
Signed-off-by: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Tested-by: Randy Dunlap <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
mm/shmem.c
This page took 0.070063 seconds and 4 git commands to generate.