mm/page_owner.c: use late_initcall to hook in enabling
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Sat, 2 May 2015 01:57:34 +0000 (21:57 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Tue, 16 Jun 2015 18:12:35 +0000 (14:12 -0400)
This was using module_init, but there is no way this code can
be modular.  In the non-modular case, a module_init becomes a
device_initcall, but this really isn't a device.   So we should
choose a more appropriate initcall bucket to put it in.

In order of execution, our close choices are:

 fs_initcall(fn)
 rootfs_initcall(fn)
 device_initcall(fn)
 late_initcall(fn)

..and since the initcall here goes after debugfs, we really
should be post-rootfs, which means late_initcall makes the
most sense here.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
mm/page_owner.c

index 0993f5f..bd5f842 100644 (file)
@@ -310,4 +310,4 @@ static int __init pageowner_init(void)
 
        return 0;
 }
-module_init(pageowner_init)
+late_initcall(pageowner_init)