]> Git Repo - linux.git/commit
mm/mempolicy.c: remove unnecessary nodemask check in kernel_migrate_pages()
authorKefeng Wang <[email protected]>
Mon, 23 Sep 2019 22:37:01 +0000 (15:37 -0700)
committerLinus Torvalds <[email protected]>
Tue, 24 Sep 2019 22:54:10 +0000 (15:54 -0700)
commit4406548ee39c2268876b61a927acad45da6f9aef
treec4e9b9d44d51012998347e5e473e620120059f42
parent32aaf0553df99cc4314f6e9f43216cd83afc6c20
mm/mempolicy.c: remove unnecessary nodemask check in kernel_migrate_pages()

1) task_nodes = cpuset_mems_allowed(current);
   -> cpuset_mems_allowed() guaranteed to return some non-empty
      subset of node_states[N_MEMORY].

2) nodes_and(*new, *new, task_nodes);
   -> after nodes_and(), the 'new' should be empty or appropriate
      nodemask(online node and with memory).

After 1) and 2), we could remove unnecessary check whether the 'new'
AND node_states[N_MEMORY] is empty.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Kefeng Wang <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Oscar Salvador <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/mempolicy.c
This page took 0.05226 seconds and 4 git commands to generate.