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:
@ -716,20 +716,17 @@ bool debugfs_initialized(void)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(debugfs_initialized);
|
||||
|
||||
|
||||
static struct kobject *debug_kobj;
|
||||
|
||||
static int __init debugfs_init(void)
|
||||
{
|
||||
int retval;
|
||||
|
||||
debug_kobj = kobject_create_and_add("debug", kernel_kobj);
|
||||
if (!debug_kobj)
|
||||
return -EINVAL;
|
||||
retval = sysfs_create_mount_point(kernel_kobj, "debug");
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
retval = register_filesystem(&debug_fs_type);
|
||||
if (retval)
|
||||
kobject_put(debug_kobj);
|
||||
sysfs_remove_mount_point(kernel_kobj, "debug");
|
||||
else
|
||||
debugfs_registered = true;
|
||||
|
||||
|
Reference in New Issue
Block a user