* [PATCH] mm/mempolicy: remove unneeded out label
@ 2022-07-19 11:52 Miaohe Lin
0 siblings, 0 replies; only message in thread
From: Miaohe Lin @ 2022-07-19 11:52 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, linux-kernel, linmiaohe
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
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
mm/mempolicy.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index dc74239d1ac7..6c27acb6cd63 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -466,9 +466,8 @@ static int queue_pages_pmd(pmd_t *pmd, spinlock_t *ptl, unsigned long addr,
}
page = pmd_page(*pmd);
if (is_huge_zero_page(page)) {
- spin_unlock(ptl);
walk->action = ACTION_CONTINUE;
- goto out;
+ goto unlock;
}
if (!queue_pages_required(page, qp))
goto unlock;
@@ -485,7 +484,6 @@ static int queue_pages_pmd(pmd_t *pmd, spinlock_t *ptl, unsigned long addr,
ret = -EIO;
unlock:
spin_unlock(ptl);
-out:
return ret;
}
--
2.23.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-19 11:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 11:52 [PATCH] mm/mempolicy: remove unneeded out label Miaohe Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox