memory tier: remove unneeded !IS_ENABLED(CONFIG_MIGRATION) check
authorMiaohe Lin <linmiaohe@huawei.com>
Sat, 10 Jun 2023 03:41:14 +0000 (11:41 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 19 Jun 2023 23:19:29 +0000 (16:19 -0700)
establish_demotion_targets() is defined while CONFIG_MIGRATION is
enabled. There's no need to check it again.

Link: https://lkml.kernel.org/r/20230610034114.981861-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory-tiers.c

index dd04f0ce52773feb97ab1c88665d88c44cc87891..a516e303e3043511fe7c96b013c5acdb0f695ca6 100644 (file)
@@ -366,7 +366,7 @@ static void establish_demotion_targets(void)
 
        lockdep_assert_held_once(&memory_tier_lock);
 
-       if (!node_demotion || !IS_ENABLED(CONFIG_MIGRATION))
+       if (!node_demotion)
                return;
 
        disable_all_demotion_targets();