From dceed1fcb83d7f9e029df26da0148af917f8e46d Mon Sep 17 00:00:00 2001
From: Michal Hocko <mhocko@suse.com>
Date: Wed, 7 Nov 2018 10:46:20 +0100
Subject: [PATCH 3/5] mm, memory_hotplug: drop pointless block alignment checks
from __offline_pages
Git-commit: 6cc2baf600eca841549e182b471d5c7b8c4143c3
Patch-mainline: v5.0-rc1
References: generic hotplug debugability
This function is never called from a context which would provide
misaligned pfn range so drop the pointless check.
Signed-off-by: Michal Hocko <mhocko@suse.com>
---
mm/memory_hotplug.c | 5 -----
1 file changed, 5 deletions(-)
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1714,11 +1714,6 @@ static int __ref __offline_pages(unsigne
struct zone *zone;
struct memory_notify arg;
- /* at least, alignment against pageblock is necessary */
- if (!IS_ALIGNED(start_pfn, pageblock_nr_pages))
- return -EINVAL;
- if (!IS_ALIGNED(end_pfn, pageblock_nr_pages))
- return -EINVAL;
/* This makes hotplug much easier...and readable.
we assume this for now. .*/
if (!test_pages_in_a_zone(start_pfn, end_pfn, &valid_start, &valid_end))