]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/mempolicy: remove unneeded out label
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 19 Jul 2022 11:52:33 +0000 (19:52 +0800)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 3 Aug 2022 18:17:13 +0000 (14:17 -0400)
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>
mm/mempolicy.c

index dc74239d1ac77675ed8f8db3e0ba36285bbe927b..6c27acb6cd63dc24ce688739a5fc12dd7a10180a 100644 (file)
@@ -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;
 }