From: Michal Hocko <mhocko@xxxxxxxx> Subject: mm, memory_hotplug: drop pointless block alignment checks from __offline_pages This function is never called from a context which would provide misaligned pfn range so drop the pointless check. Link: http://lkml.kernel.org/r/20181107101830.17405-4-mhocko@xxxxxxxxxx Signed-off-by: Michal Hocko <mhocko@xxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Reviewed-by: Oscar Salvador <osalvador@xxxxxxx> Reviewed-by: Anshuman Khandual <anshuman.khandual@xxxxxxx> Cc: Baoquan He <bhe@xxxxxxxxxx> Cc: Oscar Salvador <OSalvador@xxxxxxxx> Cc: William Kucharski <william.kucharski@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/mm/memory_hotplug.c~mm-memory_hotplug-drop-pointless-block-alignment-checks-from-__offline_pages +++ a/mm/memory_hotplug.c @@ -1554,12 +1554,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; - mem_hotplug_begin(); /* This makes hotplug much easier...and readable. _