]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Using "- 1" relies on the old_end to be page aligned and PAGE_SIZE > 1,
authorAndrea Arcangeli <aarcange@redhat.com>
Wed, 24 Aug 2011 23:47:14 +0000 (09:47 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 5 Sep 2011 07:02:24 +0000 (17:02 +1000)
commit262be44c491691910bdc3edb6111e5178723de7a
treec4c1c9e89e74f24d50a1127700803678d5e7bf7b
parent94735ba84094819877f64f3d35d10176f45cd9c9
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