[PATCH 1/6] mm: compaction: drop the redundant page validation in update_pageblock_skip()

From: Baolin Wang
Date: Thu May 25 2023 - 08:54:20 EST


The caller has validated the page before calling pdate_pageblock_skip(),
thus drop the redundant page validation in update_pageblock_skip().

Signed-off-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
---
mm/compaction.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 163e2ec70aff..426bb6ce070b 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -436,9 +436,6 @@ static void update_pageblock_skip(struct compact_control *cc,
if (cc->no_set_skip_hint)
return;

- if (!page)
- return;
-
set_pageblock_skip(page);

/* Update where async and sync compaction should restart */
--
2.27.0