]> git.karo-electronics.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>
Fri, 16 Sep 2011 05:53:50 +0000 (15:53 +1000)
commitb8a42b31387ac4c4751453761c4c45d03db00bb8
treeee6c7808dd1cdb5d1ac64dfb21c27290eef8ec6e
parent20ab44421e8c920002d07c77b679adaadd06b63a
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