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 <email@example.com>
Acked-by: Naoya Horiguchi <firstname.lastname@example.org>
Signed-off-by: Andi Kleen <email@example.com>
1 file changed