mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
mm: introduce node_zonelist() for accessing the zonelist for a GFP mask
Introduce a node_zonelist() helper function. It is used to lookup the appropriate zonelist given a node and a GFP mask. The patch on its own is a cleanup but it helps clarify parts of the two-zonelist-per-node patchset. If necessary, it can be merged with the next patch in this set without problems. Reviewed-by: Christoph Lameter <[email protected]> Signed-off-by: Mel Gorman <[email protected]> Signed-off-by: Lee Schermerhorn <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Nick Piggin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dac1d27bc8
commit
0e88460da6
8 changed files with 17 additions and 17 deletions
|
|
@ -1309,8 +1309,7 @@ static struct page *get_any_partial(struct kmem_cache *s, gfp_t flags)
|
|||
get_cycles() % 1024 > s->remote_node_defrag_ratio)
|
||||
return NULL;
|
||||
|
||||
zonelist = &NODE_DATA(
|
||||
slab_node(current->mempolicy))->node_zonelists[gfp_zone(flags)];
|
||||
zonelist = node_zonelist(slab_node(current->mempolicy), flags);
|
||||
for (z = zonelist->zones; *z; z++) {
|
||||
struct kmem_cache_node *n;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue