]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
kernfs: add CONFIG_KERNFS
authorTejun Heo <tj@kernel.org>
Mon, 3 Feb 2014 19:09:17 +0000 (14:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Feb 2014 00:08:57 +0000 (16:08 -0800)
As sysfs was kernfs's only user, kernfs has been piggybacking on
CONFIG_SYSFS; however, kernfs is scheduled to grow a new user very
soon.  Introduce a separate config option CONFIG_KERNFS which is to be
selected by kernfs users.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/Kconfig
fs/Makefile
fs/kernfs/Kconfig [new file with mode: 0644]
fs/sysfs/Kconfig
include/linux/kernfs.h

index 7385e54be4b9adbdd8a4c2d0ed3cafd3b516820a..312393f32948689169b8f569e23093d52eed637c 100644 (file)
@@ -96,6 +96,7 @@ endif # BLOCK
 menu "Pseudo filesystems"
 
 source "fs/proc/Kconfig"
+source "fs/kernfs/Kconfig"
 source "fs/sysfs/Kconfig"
 
 config TMPFS
index 47ac07bb4acc6b44b318776c44e7a6cd7bf79113..f9cb9876e466a02f7c0149412bea8a177031c509 100644 (file)
@@ -52,7 +52,8 @@ obj-$(CONFIG_FHANDLE)         += fhandle.o
 obj-y                          += quota/
 
 obj-$(CONFIG_PROC_FS)          += proc/
-obj-$(CONFIG_SYSFS)            += sysfs/ kernfs/
+obj-$(CONFIG_KERNFS)           += kernfs/
+obj-$(CONFIG_SYSFS)            += sysfs/
 obj-$(CONFIG_CONFIGFS_FS)      += configfs/
 obj-y                          += devpts/
 
diff --git a/fs/kernfs/Kconfig b/fs/kernfs/Kconfig
new file mode 100644 (file)
index 0000000..397b5f7
--- /dev/null
@@ -0,0 +1,7 @@
+#
+# KERNFS should be selected by its users
+#
+
+config KERNFS
+       bool
+       default n
index 8c41feacbac56fade7f81f59444b50b3c00630d7..b2756014508c770fbc024069be235622cca24581 100644 (file)
@@ -1,6 +1,7 @@
 config SYSFS
        bool "sysfs file system support" if EXPERT
        default y
+       select KERNFS
        help
        The sysfs filesystem is a virtual filesystem that the kernel uses to
        export internal kernel objects, their attributes, and their
index 8736ee86a1d65b4961953b00287c7c5c43fe8176..649497a56a95b2f85b5cc1763d5455f9fa6ab633 100644 (file)
@@ -201,7 +201,7 @@ struct kernfs_ops {
 #endif
 };
 
-#ifdef CONFIG_SYSFS
+#ifdef CONFIG_KERNFS
 
 static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn)
 {
@@ -284,7 +284,7 @@ void kernfs_kill_sb(struct super_block *sb);
 
 void kernfs_init(void);
 
-#else  /* CONFIG_SYSFS */
+#else  /* CONFIG_KERNFS */
 
 static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn)
 { return 0; }  /* whatever */
@@ -379,7 +379,7 @@ static inline void kernfs_kill_sb(struct super_block *sb) { }
 
 static inline void kernfs_init(void) { }
 
-#endif /* CONFIG_SYSFS */
+#endif /* CONFIG_KERNFS */
 
 static inline struct kernfs_node *
 kernfs_find_and_get(struct kernfs_node *kn, const char *name)