]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: migrate: one less atomic operation
authorJacobo Giralt <jacobo.giralt@gmail.com>
Wed, 16 Nov 2011 23:41:25 +0000 (10:41 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 23 Nov 2011 03:04:43 +0000 (14:04 +1100)
commitaf8ff1510f4999421bfd325f34b480c61a79915b
treeb7f9ce2e60382e896c1d536acdc24447167488d2
parentb8ed50368f92f7de3a24ce197328a7177ecf69a2
mm: migrate: one less atomic operation

migrate_page_move_mapping() drops a reference from the old page after
unfreezing its counter.  Both operations can be merged into a single
atomic operation by directly unfreezing to one less reference.

The same applies to migrate_huge_page_move_mapping().

Signed-off-by: Jacobo Giralt <jacobo.giralt@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/migrate.c