Re: linux-next: Tree for Apr 14 (mm/shmem.c)

From: Andrew Morton
Date: Tue Apr 14 2020 - 21:25:41 EST


On Tue, 14 Apr 2020 07:18:01 -0700 Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:

> On 4/13/20 7:39 PM, Stephen Rothwell wrote:
> > Hi all,
> >
> > Changes since 20200413:
> >
> > New tree: mhi
> >
> > My fixes tree contains:
> >
> > 6b038bdcd3d1 sh: mm: Fix build error
> >
> > Non-merge commits (relative to Linus' tree): 1154
> > 1160 files changed, 31764 insertions(+), 13498 deletions(-)
> >
> > ----------------------------------------------------------------------------
>
> on x86_64:
> # CONFIG_TRANSPARENT_HUGEPAGE is not set

Thanks. hm, this took a long time to be discovered.

> In file included from ../include/linux/export.h:43:0,
> from ../include/linux/linkage.h:7,
> from ../include/linux/fs.h:5,
> from ../mm/shmem.c:24:
> ../mm/shmem.c: In function âshmem_undo_rangeâ:
> ../include/linux/compiler.h:394:38: error: call to â__compiletime_assert_110â declared with attribute error: BUILD_BUG failed
> _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> ^
> ../include/linux/compiler.h:69:3: note: in definition of macro â__trace_if_valueâ
> (cond) ? \
> ^~~~
> ../include/linux/compiler.h:56:28: note: in expansion of macro â__trace_if_varâ
> #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
> ^~~~~~~~~~~~~~
> ../mm/shmem.c:960:6: note: in expansion of macro âifâ
> if (index <
> ^~
> ../include/linux/kernel.h:71:36: note: in expansion of macro â__round_maskâ
> #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
> ^~~~~~~~~~~~
> ../mm/shmem.c:961:10: note: in expansion of macro âround_upâ
> round_up(start, HPAGE_PMD_NR))
> ^~~~~~~~
> ../include/linux/compiler.h:382:2: note: in expansion of macro â__compiletime_assertâ
> __compiletime_assert(condition, msg, prefix, suffix)
> ^~~~~~~~~~~~~~~~~~~~
> ../include/linux/compiler.h:394:2: note: in expansion of macro â_compiletime_assertâ
> _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> ^~~~~~~~~~~~~~~~~~~
> ../include/linux/build_bug.h:39:37: note: in expansion of macro âcompiletime_assertâ
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^~~~~~~~~~~~~~~~~~
> ../include/linux/build_bug.h:59:21: note: in expansion of macro âBUILD_BUG_ON_MSGâ
> #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
> ^~~~~~~~~~~~~~~~
> ../include/linux/huge_mm.h:319:28: note: in expansion of macro âBUILD_BUGâ
> #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
> ^~~~~~~~~
> ../include/linux/huge_mm.h:115:26: note: in expansion of macro âHPAGE_PMD_SHIFTâ
> #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
> ^~~~~~~~~~~~~~~
> ../include/linux/huge_mm.h:116:26: note: in expansion of macro âHPAGE_PMD_ORDERâ
> #define HPAGE_PMD_NR (1<<HPAGE_PMD_ORDER)
> ^~~~~~~~~~~~~~~
> ../mm/shmem.c:961:26: note: in expansion of macro âHPAGE_PMD_NRâ
> round_up(start, HPAGE_PMD_NR))
> ^~~~~~~~~~~~
>

That's

if (index <
round_up(start, HPAGE_PMD_NR))
start = index + 1;

from Hugh's 71725ed10c40696 ("mm: huge tmpfs: try to split_huge_page()
when punching hole").