mm/memblock.c: fix bug in early_dyn_memhotplug
memblock.memory.cnt will decrease if we remove all memory
blocks in a region. We will lose the next region in this
condition. The solution is we save memblock.memory.cnt
before we scan through a region and compare the new
counter with the old one after that, we decrease the idx
if we find counter changes. This way, we are always using
the correct idx before we enter next loop.
Change-Id: Id6bf83497f1048cf614e50e23484f2dea7ffcd07
Signed-off-by:
Jiacheng Zheng <jiaczhen@codeaurora.org>
Loading
Please register or sign in to comment