• Jan Kara's avatar
    mm: migrate: make buffer_migrate_page_norefs() actually succeed · 80409c65
    Jan Kara authored
    Currently, buffer_migrate_page_norefs() was constantly failing because
    buffer_migrate_lock_buffers() grabbed reference on each buffer.  In
    fact, there's no reason for buffer_migrate_lock_buffers() to grab any
    buffer references as the page is locked during all our operation and
    thus nobody can reclaim buffers from the page.
    
    So remove grabbing of buffer references which also makes
    buffer_migrate_page_norefs() succeed.
    
    Link: http://lkml.kernel.org/r/20190116131217.7226-1-jack@suse.cz
    Fixes: 89cb0888 "mm: migrate: provide buffer_migrate_page_norefs()"
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
    Cc: Pavel Machek <pavel@ucw.cz>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Michal Hocko <mhocko@kernel.org>
    Cc: Zi Yan <zi.yan@cs.rutgers.edu>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    80409c65
migrate.c 76.1 KB