mm: migrate: lock buffers before migrate_page_move_mapping()
authorJan Kara <jack@suse.cz>
Fri, 28 Dec 2018 08:39:05 +0000 (00:39 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Dec 2018 20:11:51 +0000 (12:11 -0800)
commitcc4f11e69fd00c61c38619759b07d00631bda5ca
tree24eca7a3290201f5534870d26c70dbd5f1f28020
parent0b3901b38d9d916f634e903ce7cd2a8ddd5b1559
mm: migrate: lock buffers before migrate_page_move_mapping()

Lock buffers before calling into migrate_page_move_mapping() so that that
function doesn't have to know about buffers (which is somewhat unexpected
anyway) and all the buffer head logic is in buffer_migrate_page().

Link: http://lkml.kernel.org/r/20181211172143.7358-3-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c