Skip to content

Commit 6cc2baf

Browse files
Michal Hockotorvalds
authored andcommitted
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@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Oscar Salvador <osalvador@suse.de> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Baoquan He <bhe@redhat.com> Cc: Oscar Salvador <OSalvador@suse.com> Cc: William Kucharski <william.kucharski@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent e0392cf commit 6cc2baf

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

mm/memory_hotplug.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,12 +1554,6 @@ static int __ref __offline_pages(unsigned long start_pfn,
15541554
struct zone *zone;
15551555
struct memory_notify arg;
15561556

1557-
/* at least, alignment against pageblock is necessary */
1558-
if (!IS_ALIGNED(start_pfn, pageblock_nr_pages))
1559-
return -EINVAL;
1560-
if (!IS_ALIGNED(end_pfn, pageblock_nr_pages))
1561-
return -EINVAL;
1562-
15631557
mem_hotplug_begin();
15641558

15651559
/* This makes hotplug much easier...and readable.

0 commit comments

Comments
 (0)