• Christoph Lameter's avatar
    [PATCH] page migration: simplify migrate_pages() · e24f0b8f
    Christoph Lameter authored
    Currently migrate_pages() is mess with lots of goto.  Extract two functions
    from migrate_pages() and get rid of the gotos.
    
    Plus we can just unconditionally set the locked bit on the new page since we
    are the only one holding a reference.  Locking is to stop others from
    accessing the page once we establish references to the new page.
    
    Remove the list_del from move_to_lru in order to have finer control over list
    processing.
    
    [akpm@osdl.org: add debug check]
    Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
    Cc: Hugh Dickins <hugh@veritas.com>
    Cc: Jes Sorensen <jes@trained-monkey.org>
    Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
    Cc: Andi Kleen <ak@muc.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    e24f0b8f
migrate.c 16.8 KB