[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200119030636.11899-9-richardw.yang@linux.intel.com>
Date: Sun, 19 Jan 2020 11:06:36 +0800
From: Wei Yang <richardw.yang@...ux.intel.com>
To: akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, mhocko@...e.com,
yang.shi@...ux.alibaba.com,
Wei Yang <richardw.yang@...ux.intel.com>
Subject: [PATCH 8/8] mm/migrate.c: use break instead of goto out_flush
Label out_flush is just outside the loop, so break the loop is enough.
Signed-off-by: Wei Yang <richardw.yang@...ux.intel.com>
---
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);
--
2.17.1
Powered by blists - more mailing lists