lkml.org 
[lkml]   [2020]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Patch v3 1/4] mm/migrate.c: not necessary to check start and i
Date
Till here, i must no less than start. And if i equals to start,
store_status() would always return 0.

Remove some unnecessary check to make it easy to read and prepare for
further cleanup.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
---
mm/migrate.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 6a6c8f247bce..ae3db45c6a42 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1674,11 +1674,9 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
err += nr_pages - i - 1;
goto out;
}
- if (i > start) {
- err = store_status(status, start, current_node, i - start);
- if (err)
- goto out;
- }
+ err = store_status(status, start, current_node, i - start);
+ if (err)
+ goto out;
current_node = NUMA_NO_NODE;
}
out_flush:
--
2.17.1
\
 
 \ /
  Last update: 2020-01-26 11:28    [W:0.078 / U:3.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site