hulk inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9935 -------------------------------- Fix compile error with MEMORY_RELIABLE & !CONFIG_DYNAMIC_POOL & !CONFIG_HUGETLBFS. Since dynamic_pool_should_alloc is needed by memory reliable, movable the stub defination out of CONFIG_HUGETLBFS to fix this. Fixes: fd855715f24e ("mm/mem_reliable: Fallback to dpool if reliable memory is not enough") Signed-off-by: Wupeng Ma <mawupeng1@huawei.com> --- include/linux/dynamic_pool.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/dynamic_pool.h b/include/linux/dynamic_pool.h index 1d12d76405cf7..88bacd3ddb999 100644 --- a/include/linux/dynamic_pool.h +++ b/include/linux/dynamic_pool.h @@ -197,11 +197,6 @@ static inline int dynamic_pool_hugetlb_acct_memory(struct hstate *h, long delta, return -ENOMEM; } -static inline bool dynamic_pool_should_alloc(gfp_t gfp_mask, unsigned int order) -{ - return false; -} - static inline struct folio *dynamic_pool_alloc_hugepage(struct hugetlbfs_inode_info *p, struct hstate *h, bool reserved) { @@ -214,6 +209,11 @@ static inline void dynamic_pool_free_hugepage(struct folio *folio, } #endif +static inline bool dynamic_pool_should_alloc(gfp_t gfp_mask, unsigned int order) +{ + return false; +} + static inline void dynamic_pool_inherit(struct mem_cgroup *memcg) { } -- 2.43.0