| From: Miaohe Lin <linmiaohe@huawei.com> |
| Subject: mm/migration: remove unneeded out label |
| |
| We can do prep_transhuge_page when newpage is not NULL. Thus we can |
| remove out label to simplify the code. |
| |
| Link: https://lkml.kernel.org/r/20220318111709.60311-3-linmiaohe@huawei.com |
| Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> |
| Reviewed-by: Muchun Song <songmuchun@bytedance.com> |
| Cc: Alistair Popple <apopple@nvidia.com> |
| Cc: Baolin Wang <baolin.wang@linux.alibaba.com> |
| Cc: "Huang, Ying" <ying.huang@intel.com> |
| Cc: Zi Yan <ziy@nvidia.com> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| mm/migrate.c | 7 ++----- |
| 1 file changed, 2 insertions(+), 5 deletions(-) |
| |
| --- a/mm/migrate.c~mm-migration-remove-unneeded-out-label |
| +++ a/mm/migrate.c |
| @@ -2028,12 +2028,9 @@ static struct page *alloc_misplaced_dst_ |
| |
| newpage = alloc_pages_node(nid, (GFP_TRANSHUGE_LIGHT | __GFP_THISNODE), |
| HPAGE_PMD_ORDER); |
| - if (!newpage) |
| - goto out; |
| + if (newpage) |
| + prep_transhuge_page(newpage); |
| |
| - prep_transhuge_page(newpage); |
| - |
| -out: |
| return newpage; |
| } |
| |
| _ |