mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
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>
This commit is contained in:
parent
87d2846fcf
commit
f9bb48825a
11 changed files with 40 additions and 65 deletions
|
@ -1238,7 +1238,6 @@ static void fuse_fs_cleanup(void)
|
|||
}
|
||||
|
||||
static struct kobject *fuse_kobj;
|
||||
static struct kobject *connections_kobj;
|
||||
|
||||
static int fuse_sysfs_init(void)
|
||||
{
|
||||
|
@ -1250,11 +1249,9 @@ static int fuse_sysfs_init(void)
|
|||
goto out_err;
|
||||
}
|
||||
|
||||
connections_kobj = kobject_create_and_add("connections", fuse_kobj);
|
||||
if (!connections_kobj) {
|
||||
err = -ENOMEM;
|
||||
err = sysfs_create_mount_point(fuse_kobj, "connections");
|
||||
if (err)
|
||||
goto out_fuse_unregister;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -1266,7 +1263,7 @@ static int fuse_sysfs_init(void)
|
|||
|
||||
static void fuse_sysfs_cleanup(void)
|
||||
{
|
||||
kobject_put(connections_kobj);
|
||||
sysfs_remove_mount_point(fuse_kobj, "connections");
|
||||
kobject_put(fuse_kobj);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue