summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/mount.c
diff options
context:
space:
mode:
authorJianyu Zhan <nasa4836@gmail.com>2014-04-26 15:40:28 +0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-03 08:11:18 -0700
commitc9482a5bdcc09be9096f40e858c5fe39c389cd52 (patch)
tree7227a6ac1cee3b5280de6dc51f37e7501af56385 /fs/sysfs/mount.c
parentcae61ba37b4c2672704cbd8a626fbd85be7e67d9 (diff)
downloadop-kernel-dev-c9482a5bdcc09be9096f40e858c5fe39c389cd52.zip
op-kernel-dev-c9482a5bdcc09be9096f40e858c5fe39c389cd52.tar.gz
kernfs: move the last knowledge of sysfs out from kernfs
There is still one residue of sysfs remaining: the sb_magic SYSFS_MAGIC. However this should be kernfs user specific, so this patch moves it out. Kerrnfs user should specify their magic number while mouting. Signed-off-by: Jianyu Zhan <nasa4836@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r--fs/sysfs/mount.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index 8794423..8a49486 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -13,6 +13,7 @@
#define DEBUG
#include <linux/fs.h>
+#include <linux/magic.h>
#include <linux/mount.h>
#include <linux/init.h>
#include <linux/user_namespace.h>
@@ -38,7 +39,8 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type,
}
ns = kobj_ns_grab_current(KOBJ_NS_TYPE_NET);
- root = kernfs_mount_ns(fs_type, flags, sysfs_root, &new_sb, ns);
+ root = kernfs_mount_ns(fs_type, flags, sysfs_root,
+ SYSFS_MAGIC, &new_sb, ns);
if (IS_ERR(root) || !new_sb)
kobj_ns_drop(KOBJ_NS_TYPE_NET, ns);
return root;
OpenPOWER on IntegriCloud