include/linux/nodemask.h: create next_node_in() helper
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 20 May 2016 00:10:58 +0000 (17:10 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 May 2016 02:12:14 +0000 (19:12 -0700)
commit0edaf86cf1a6a97d811fc34765ddbcbc310de564
tree5ba3b435651e8d8459b577d74ce8bb3f24dd44a1
parent48a270554a3251681ae11173f2fd6389d943e183
include/linux/nodemask.h: create next_node_in() helper

Lots of code does

node = next_node(node, XXX);
if (node == MAX_NUMNODES)
node = first_node(XXX);

so create next_node_in() to do this and use it in various places.

[mhocko@suse.com: use next_node_in() helper]
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Michal Hocko <mhocko@suse.com>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Laura Abbott <lauraa@codeaurora.org>
Cc: Hui Zhu <zhuhui@xiaomi.com>
Cc: Wang Xiaoqiang <wangxq10@lzu.edu.cn>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/tile/kernel/setup.c
arch/x86/mm/numa.c
include/linux/nodemask.h
kernel/cpuset.c
lib/Makefile
lib/nodemask.c [new file with mode: 0644]
mm/hugetlb.c
mm/memcontrol.c
mm/mempolicy.c
mm/page_isolation.c
mm/slab.c