Using "- 1" relies on the old_end to be page aligned and PAGE_SIZE > 1,
commitfd0f785a50acc020021ea60a8437e32d367b2414
authorAndrea Arcangeli <aarcange@redhat.com>
Wed, 24 Aug 2011 23:47:14 +0000 (25 09:47 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 31 Aug 2011 04:27:33 +0000 (31 14:27 +1000)
tree12d8505d1ffa89f27a2b8a2bae81ede6dc479caa
parent2c2b12b90f28adc58818a3a92eaa4cf84cebe968
Using "- 1" relies on the old_end to be page aligned and PAGE_SIZE > 1,
those are reasonable requirements but the check remains obscure and it
looks more like an off by one error than an overflow check.  This I feel
will improve readability.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Johannes Weiner <jweiner@redhat.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mremap.c