From patchwork Sun Jan 19 03:06:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 11340461 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 68677138D for ; Sun, 19 Jan 2020 03:07:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 364192469C for ; Sun, 19 Jan 2020 03:07:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 364192469C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B988C6B055F; Sat, 18 Jan 2020 22:07:33 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B6FF06B0560; Sat, 18 Jan 2020 22:07:33 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A5DD36B0561; Sat, 18 Jan 2020 22:07:33 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0003.hostedemail.com [216.40.44.3]) by kanga.kvack.org (Postfix) with ESMTP id 89E4F6B055F for ; Sat, 18 Jan 2020 22:07:33 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 38B518248047 for ; Sun, 19 Jan 2020 03:07:33 +0000 (UTC) X-FDA: 76392898386.11.waste24_24c6d77aa4845 X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,richardw.yang@linux.intel.com,:akpm@linux-foundation.org::linux-kernel@vger.kernel.org:mhocko@suse.com:yang.shi@linux.alibaba.com:richardw.yang@linux.intel.com,RULES_HIT:30046:30054:30070,0,RBL:134.134.136.31:@linux.intel.com:.lbl8.mailshell.net-62.18.0.100 64.95.201.95,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:33,LUA_SUMMARY:none X-HE-Tag: waste24_24c6d77aa4845 X-Filterd-Recvd-Size: 2709 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Sun, 19 Jan 2020 03:07:32 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2020 19:07:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,336,1574150400"; d="scan'208";a="258308795" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by fmsmga002.fm.intel.com with ESMTP; 18 Jan 2020 19:07:31 -0800 From: Wei Yang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, mhocko@suse.com, yang.shi@linux.alibaba.com, Wei Yang Subject: [PATCH 8/8] mm/migrate.c: use break instead of goto out_flush Date: Sun, 19 Jan 2020 11:06:36 +0800 Message-Id: <20200119030636.11899-9-richardw.yang@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200119030636.11899-1-richardw.yang@linux.intel.com> References: <20200119030636.11899-1-richardw.yang@linux.intel.com> 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: Label out_flush is just outside the loop, so break the loop is enough. Signed-off-by: Wei Yang --- mm/migrate.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 2a857fec65b6..59bfae11b9d6 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1621,22 +1621,22 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes, err = -EFAULT; if (get_user(p, pages + i)) - goto out_flush; + break; if (get_user(node, nodes + i)) - goto out_flush; + break; addr = (unsigned long)untagged_addr(p); /* Check node if it is not checked. */ if (current_node == NUMA_NO_NODE || node != current_node) { err = -ENODEV; if (node < 0 || node >= MAX_NUMNODES) - goto out_flush; + break; if (!node_state(node, N_MEMORY)) - goto out_flush; + break; err = -EACCES; if (!node_isset(node, task_nodes)) - goto out_flush; + break; } if (current_node == NUMA_NO_NODE) { @@ -1676,9 +1676,9 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes, */ err = store_status(status, i, err ? : current_node, 1); if (err) - goto out_flush; + break; } -out_flush: + /* Make sure we do not overwrite the existing error */ err1 = move_pages_and_store_status(mm, current_node, &pagelist, status, start, i - start - need_move);