summaryrefslogtreecommitdiffstats
path: root/fs/fuse/inode.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-05-13 18:35:41 -0400
committerEric W. Biederman <ebiederm@xmission.com>2015-07-01 11:36:47 -0400
commitf9bb48825a6b5d02f4cabcc78967c75db903dcdc (patch)
tree4883ba33a67bb07e6c9611b4b7a818c428c73ec7 /fs/fuse/inode.c
parent87d2846fcf88113fae2341da1ca9a71f0d916f2c (diff)
sysfs: Create mountpoints with sysfs_create_mount_point
This allows for better documentation in the code and it allows for a simpler and fully correct version of fs_fully_visible to be written. The mount points converted and their filesystems are: /sys/hypervisor/s390/ s390_hypfs /sys/kernel/config/ configfs /sys/kernel/debug/ debugfs /sys/firmware/efi/efivars/ efivarfs /sys/fs/fuse/connections/ fusectl /sys/fs/pstore/ pstore /sys/kernel/tracing/ tracefs /sys/fs/cgroup/ cgroup /sys/kernel/security/ securityfs /sys/fs/selinux/ selinuxfs /sys/fs/smackfs/ smackfs Cc: stable@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r--fs/fuse/inode.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 082ac1c97f39..18dacf9ed8ff 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1238,7 +1238,6 @@ static void fuse_fs_cleanup(void)
1238} 1238}
1239 1239
1240static struct kobject *fuse_kobj; 1240static struct kobject *fuse_kobj;
1241static struct kobject *connections_kobj;
1242 1241
1243static int fuse_sysfs_init(void) 1242static int fuse_sysfs_init(void)
1244{ 1243{
@@ -1250,11 +1249,9 @@ static int fuse_sysfs_init(void)
1250 goto out_err; 1249 goto out_err;
1251 } 1250 }
1252 1251
1253 connections_kobj = kobject_create_and_add("connections", fuse_kobj); 1252 err = sysfs_create_mount_point(fuse_kobj, "connections");
1254 if (!connections_kobj) { 1253 if (err)
1255 err = -ENOMEM;
1256 goto out_fuse_unregister; 1254 goto out_fuse_unregister;
1257 }
1258 1255
1259 return 0; 1256 return 0;
1260 1257
@@ -1266,7 +1263,7 @@ static int fuse_sysfs_init(void)
1266 1263
1267static void fuse_sysfs_cleanup(void) 1264static void fuse_sysfs_cleanup(void)
1268{ 1265{
1269 kobject_put(connections_kobj); 1266 sysfs_remove_mount_point(fuse_kobj, "connections");
1270 kobject_put(fuse_kobj); 1267 kobject_put(fuse_kobj);
1271} 1268}
1272 1269