[PATCH 6/8] fs: make direct-io.c explicitly non-modular

From: Paul Gortmaker
Date: Thu Dec 17 2015 - 14:13:04 EST


The Makefile currently controlling compilation of this code has:

ifeq ($(CONFIG_BLOCK),y)
obj-y += buffer.o block_dev.o direct-io.o mpage.o

and in addition to that the Kconfig is:

block/Kconfig:menuconfig BLOCK
block/Kconfig: bool "Enable the block layer" if EXPERT

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modularity so that when reading the
code there is no doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular
case, the init ordering gets bumped to one level earlier when we
use the more appropriate fs_initcall here. However we've made similar
changes before without any fallout and none is expected here either.

Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: linux-fsdevel@xxxxxxxxxxxxxxx
Signed-off-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
---
fs/direct-io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/direct-io.c b/fs/direct-io.c
index 602e8441bc0f..a7d7b466f00e 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -20,7 +20,7 @@
*/

#include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/mm.h>
@@ -1349,4 +1349,4 @@ static __init int dio_init(void)
dio_cache = KMEM_CACHE(dio, SLAB_PANIC);
return 0;
}
-module_init(dio_init)
+fs_initcall(dio_init)
--
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/