Signed-off-by: Yin Tirui <yintirui@huawei.com> --- mm/share_pool.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mm/share_pool.c b/mm/share_pool.c index b91fb3698..7c7582097 100644 --- a/mm/share_pool.c +++ b/mm/share_pool.c @@ -2426,8 +2426,11 @@ static bool sp_reclaim_hugepages(struct sp_alloc_context *ac) static bool sp_alloc_fallback(struct sp_area *spa, struct sp_alloc_context *ac) { - if (sysctl_hugetlb_reclaim_ext_enable && sp_reclaim_hugepages(ac)) + if (sysctl_hugetlb_reclaim_ext_enable && sp_reclaim_hugepages(ac)) { + sp_area_put_locked(spa); return true; + } + /* * If hugepage allocation fails, this will transfer to normal page * and try again. (only if SP_HUGEPAGE_ONLY is not flagged -- 2.43.0