]> 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>
Mon, 29 Aug 2011 05:22:54 +0000 (15:22 +1000)
commitc64a27baf764eb516d1c72e1b1b6ea3ca27299e0
treef95676b34d3cc4af58e5e2a1064b0e1efd89dff3
parentcf5f2a0c6a64494c0d201f6f9d121d4abca6e0ae
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