]> 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>
Thu, 15 Sep 2011 06:21:28 +0000 (16:21 +1000)
commit052144d10bf7651866e571579ac40e5c6d6b6bf0
tree28571350d51c0093aa94325ebdb61085eb4b2969
parent52cd98bb57d0fe2763b90aafd467dddc64a8749f
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