The patch titled Subject: mm: remove redundant return in set_huge_zero_folio() has been added to the -mm mm-unstable branch. Its filename is mm-remove-redundant-return-in-set_huge_zero_folio.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-remove-redundant-return-in-set_huge_zero_folio.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Dev Jain <dev.jain@xxxxxxx> Subject: mm: remove redundant return in set_huge_zero_folio() Date: Thu, 6 Mar 2025 20:13:15 +0530 It is the responsibility of the caller to check pmd_none(); in any case, we are not achieving anything by returning since there is no return value to tell the caller that we succeeded or not. So remove this check. Link: https://lkml.kernel.org/r/20250306144315.21907-1-dev.jain@xxxxxxx Signed-off-by: Dev Jain <dev.jain@xxxxxxx> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> Cc: Matthew Wilcow (Oracle) <willy@xxxxxxxxxxxxx> Cc: Ryan Roberts <ryan.roberts@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/huge_memory.c | 2 -- 1 file changed, 2 deletions(-) --- a/mm/huge_memory.c~mm-remove-redundant-return-in-set_huge_zero_folio +++ a/mm/huge_memory.c @@ -1309,8 +1309,6 @@ static void set_huge_zero_folio(pgtable_ struct folio *zero_folio) { pmd_t entry; - if (!pmd_none(*pmd)) - return; entry = mk_pmd(&zero_folio->page, vma->vm_page_prot); entry = pmd_mkhuge(entry); pgtable_trans_huge_deposit(mm, pmd, pgtable); _ Patches currently in -mm which might be from dev.jain@xxxxxxx are mm-remove-redundant-return-in-set_huge_zero_folio.patch