From patchwork Thu Aug 5 15:06:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 12421419 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03B12C432BE for ; Thu, 5 Aug 2021 15:06:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8FA7F60EEA for ; Thu, 5 Aug 2021 15:06:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8FA7F60EEA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id B3DC56B0071; Thu, 5 Aug 2021 11:06:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AC6536B0072; Thu, 5 Aug 2021 11:06:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F1576B0073; Thu, 5 Aug 2021 11:06:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0098.hostedemail.com [216.40.44.98]) by kanga.kvack.org (Postfix) with ESMTP id 6B5056B0071 for ; Thu, 5 Aug 2021 11:06:16 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 15472180301CC for ; Thu, 5 Aug 2021 15:06:16 +0000 (UTC) X-FDA: 78441352752.10.1AD2FBA Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by imf25.hostedemail.com (Postfix) with ESMTP id C95C3B001E8D for ; Thu, 5 Aug 2021 15:06:14 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R811e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0Ui3FG-Y_1628175970; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0Ui3FG-Y_1628175970) by smtp.aliyun-inc.com(127.0.0.1); Thu, 05 Aug 2021 23:06:10 +0800 From: Baolin Wang To: akpm@linux-foundation.org Cc: baolin.wang@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] mm: migrate: Remove redundant goto labels Date: Thu, 5 Aug 2021 23:06:00 +0800 Message-Id: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: In-Reply-To: References: Authentication-Results: imf25.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf25.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.43 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com X-Stat-Signature: 3h731sitmunid3s5cx93q81cki34cei5 X-Rspamd-Queue-Id: C95C3B001E8D X-Rspamd-Server: rspam01 X-HE-Tag: 1628175974-542 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Remove redundant goto labels to simplify the code. Signed-off-by: Baolin Wang --- mm/migrate.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 0ab364f..ed74fda 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -911,9 +911,8 @@ static int move_to_new_page(struct page *newpage, struct page *page, */ VM_BUG_ON_PAGE(!PageIsolated(page), page); if (!PageMovable(page)) { - rc = MIGRATEPAGE_SUCCESS; __ClearPageIsolated(page); - goto out; + return MIGRATEPAGE_SUCCESS; } rc = mapping->a_ops->migratepage(mapping, newpage, @@ -949,7 +948,7 @@ static int move_to_new_page(struct page *newpage, struct page *page, flush_dcache_page(newpage); } -out: + return rc; } @@ -2095,11 +2094,10 @@ static struct page *alloc_misplaced_dst_page_thp(struct page *page, newpage = alloc_pages_node(nid, (GFP_TRANSHUGE_LIGHT | __GFP_THISNODE), HPAGE_PMD_ORDER); if (!newpage) - goto out; + return NULL; prep_transhuge_page(newpage); -out: return newpage; }