From: Ma Wupeng mawupeng1@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IB0OV7
--------------------------------
Commit 45dbef4c04f6 ("mm: page_eject: Add mc support during offline page") brings mcs support for migrate_page, however this is only enabled for feature page eject which is only enabled in arm64. Since this support can works in any scenarios, remove the restriction(PF_MCS) and make it works for all migrate_page in arm64.
Signed-off-by: Ma Wupeng mawupeng1@huawei.com --- mm/migrate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c index cff5e11437d9..cf8c05ea821e 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -743,9 +743,8 @@ int migrate_page_extra(struct address_space *mapping,
BUG_ON(PageWriteback(page)); /* Writeback must be complete */
- if (unlikely(IS_ENABLED(CONFIG_ARCH_HAS_COPY_MC) && - (current->flags & PF_MCS) && - (mode != MIGRATE_SYNC_NO_COPY))) + if (IS_ENABLED(CONFIG_ARM64) && IS_ENABLED(CONFIG_ARCH_HAS_COPY_MC) && + (mode != MIGRATE_SYNC_NO_COPY)) return migrate_page_mc_extra(mapping, newpage, page, mode, extra_count);