Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Miaohe Lin and committed by
akpm
6d97cf88 189cdcfe

+1 -3
+1 -3
mm/mempolicy.c
··· 465 465 } 466 466 page = pmd_page(*pmd); 467 467 if (is_huge_zero_page(page)) { 468 - spin_unlock(ptl); 469 468 walk->action = ACTION_CONTINUE; 470 - goto out; 469 + goto unlock; 471 470 } 472 471 if (!queue_pages_required(page, qp)) 473 472 goto unlock; ··· 483 484 ret = -EIO; 484 485 unlock: 485 486 spin_unlock(ptl); 486 - out: 487 487 return ret; 488 488 } 489 489