mm: compaction: only set skip flag if cc->no_set_skip_hint is false
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Thu, 25 May 2023 12:53:59 +0000 (20:53 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 9 Jun 2023 23:25:42 +0000 (16:25 -0700)
commit8b71b499ff98fdcda7efefc146841a8b4d26813d
tree79c5e1adc649324d5afac7737a9c1a1142f85146
parentcf650342f83ae655c6d05a1a74ae1672459973d0
mm: compaction: only set skip flag if cc->no_set_skip_hint is false

To keep the same logic as test_and_set_skip(), only set the skip flag if
cc->no_set_skip_hint is false, which makes code more reasonable.

Link: https://lkml.kernel.org/r/0eb2cd2407ffb259ae6e3071e10f70f2d41d0f3e.1685018752.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c