Skip to content

Commit 11e88e9

Browse files
Dev Jainakpm00
authored andcommitted
mm: remove redundant return in set_huge_zero_folio()
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/[email protected] Signed-off-by: Dev Jain <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Cc: Matthew Wilcow (Oracle) <[email protected]> Cc: Ryan Roberts <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 105f830 commit 11e88e9

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

mm/huge_memory.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,8 +1309,6 @@ static void set_huge_zero_folio(pgtable_t pgtable, struct mm_struct *mm,
13091309
struct folio *zero_folio)
13101310
{
13111311
pmd_t entry;
1312-
if (!pmd_none(*pmd))
1313-
return;
13141312
entry = mk_pmd(&zero_folio->page, vma->vm_page_prot);
13151313
entry = pmd_mkhuge(entry);
13161314
pgtable_trans_huge_deposit(mm, pmd, pgtable);

0 commit comments

Comments
 (0)