mm, memory_hotplug: drop pointless block alignment checks from __offline_pages
authorMichal Hocko <[email protected]>
Fri, 28 Dec 2018 08:33:45 +0000 (00:33 -0800)
committerLinus Torvalds <[email protected]>
Fri, 28 Dec 2018 20:11:46 +0000 (12:11 -0800)
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/[email protected]
Signed-off-by: Michal Hocko <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Reviewed-by: Oscar Salvador <[email protected]>
Reviewed-by: Anshuman Khandual <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: William Kucharski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memory_hotplug.c

index 2b2b3ccbbfb5768a3d6b530799ebf5c4c3129688..a92b1b8f6218485ea844e561b639b217490b301e 100644 (file)
@@ -1554,12 +1554,6 @@ static int __ref __offline_pages(unsigned long start_pfn,
        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.