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 <jin.dongming@np.css.fujitsu.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
1 file changed