Fix unsuitable avoid checking of write/read_hugepage().
The addr of write/read_hugepage() is the mapping address of file.
So no matter how many hugepages are mapped, addr will be
the head address of all hugepages.
The avoid of write/read_hugepage() is the address which does not
want to be touched. So it could be the head address of any hugepage.
So addr == avoid in write/read_hugepage() is not equal always except
the avoid is the address of the first hugepage.
This patch fixed it.
Signed-off-by: Jin Dongming <firstname.lastname@example.org>
Acked-by: Naoya Horiguchi <email@example.com>
Signed-off-by: Andi Kleen <firstname.lastname@example.org>
1 file changed