diff options
author | Wanlong Gao <wanlong.gao@gmail.com> | 2016-10-07 17:01:04 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-07 18:46:29 -0700 |
commit | 914a051654c5401cb216a939e214e17ec018b6a9 (patch) | |
tree | 0a4415bbe49e60da7fb4a0f508e6d311c250bdcd /mm/nobootmem.c | |
parent | 19938e350adc60f3b9381ae6fc68da40f7d1a9f6 (diff) | |
download | linux-stable-914a051654c5401cb216a939e214e17ec018b6a9.tar.gz linux-stable-914a051654c5401cb216a939e214e17ec018b6a9.tar.bz2 linux-stable-914a051654c5401cb216a939e214e17ec018b6a9.zip |
mm: nobootmem: move the comment of free_all_bootmem
Commit b4def3509d18 ("mm, nobootmem: clean-up of free_low_memory_core_early()")
removed the unnecessary nodeid argument, after that, this comment
becomes more confused. We should move it to the right place.
Fixes: b4def3509d18c1db9 ("mm, nobootmem: clean-up of free_low_memory_core_early()")
Link: http://lkml.kernel.org/r/1473996082-14603-1-git-send-email-wanlong.gao@gmail.com
Signed-off-by: Wanlong Gao <wanlong.gao@gmail.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/nobootmem.c')
-rw-r--r-- | mm/nobootmem.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/nobootmem.c b/mm/nobootmem.c index 490d46abddad..ba609b684d7a 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c @@ -137,6 +137,11 @@ static unsigned long __init free_low_memory_core_early(void) for_each_reserved_mem_region(i, &start, &end) reserve_bootmem_region(start, end); + /* + * We need to use NUMA_NO_NODE instead of NODE_DATA(0)->node_id + * because in some case like Node0 doesn't have RAM installed + * low ram will be on Node1 + */ for_each_free_mem_range(i, NUMA_NO_NODE, MEMBLOCK_NONE, &start, &end, NULL) count += __free_memory_core(start, end); @@ -194,11 +199,6 @@ unsigned long __init free_all_bootmem(void) reset_all_zones_managed_pages(); - /* - * We need to use NUMA_NO_NODE instead of NODE_DATA(0)->node_id - * because in some case like Node0 doesn't have RAM installed - * low ram will be on Node1 - */ pages = free_low_memory_core_early(); totalram_pages += pages; |