Skip to content

Commit 6d97cf8

Browse files
MiaoheLinakpm00
authored andcommitted
mm/mempolicy: remove unneeded out label
We can use unlock label to unlock ptl and return ret directly to remove the unneeded out label and reduce the size of mempolicy.o. No functional change intended. [Before] text data bss dec hex filename 26702 3972 6168 36842 8fea mm/mempolicy.o [After] text data bss dec hex filename 26662 3972 6168 36802 8fc2 mm/mempolicy.o Link: https://lkml.kernel.org/r/20220719115233.6706-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 189cdcf commit 6d97cf8

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

mm/mempolicy.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,8 @@ static int queue_pages_pmd(pmd_t *pmd, spinlock_t *ptl, unsigned long addr,
465465
}
466466
page = pmd_page(*pmd);
467467
if (is_huge_zero_page(page)) {
468-
spin_unlock(ptl);
469468
walk->action = ACTION_CONTINUE;
470-
goto out;
469+
goto unlock;
471470
}
472471
if (!queue_pages_required(page, qp))
473472
goto unlock;
@@ -484,7 +483,6 @@ static int queue_pages_pmd(pmd_t *pmd, spinlock_t *ptl, unsigned long addr,
484483
ret = -EIO;
485484
unlock:
486485
spin_unlock(ptl);
487-
out:
488486
return ret;
489487
}
490488

0 commit comments

Comments
 (0)