diff options
| author | Eric W. Biederman <ebiederm@xmission.com> | 2015-05-13 18:35:41 -0400 |
|---|---|---|
| committer | Eric W. Biederman <ebiederm@xmission.com> | 2015-07-01 11:36:47 -0400 |
| commit | f9bb48825a6b5d02f4cabcc78967c75db903dcdc (patch) | |
| tree | 4883ba33a67bb07e6c9611b4b7a818c428c73ec7 /fs/debugfs | |
| parent | 87d2846fcf88113fae2341da1ca9a71f0d916f2c (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/debugfs')
| -rw-r--r-- | fs/debugfs/inode.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index c1e7ffb0dab6..12756040ca20 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
| @@ -716,20 +716,17 @@ bool debugfs_initialized(void) | |||
| 716 | } | 716 | } |
| 717 | EXPORT_SYMBOL_GPL(debugfs_initialized); | 717 | EXPORT_SYMBOL_GPL(debugfs_initialized); |
| 718 | 718 | ||
| 719 | |||
| 720 | static struct kobject *debug_kobj; | ||
| 721 | |||
| 722 | static int __init debugfs_init(void) | 719 | static int __init debugfs_init(void) |
| 723 | { | 720 | { |
| 724 | int retval; | 721 | int retval; |
| 725 | 722 | ||
| 726 | debug_kobj = kobject_create_and_add("debug", kernel_kobj); | 723 | retval = sysfs_create_mount_point(kernel_kobj, "debug"); |
| 727 | if (!debug_kobj) | 724 | if (retval) |
| 728 | return -EINVAL; | 725 | return retval; |
| 729 | 726 | ||
| 730 | retval = register_filesystem(&debug_fs_type); | 727 | retval = register_filesystem(&debug_fs_type); |
| 731 | if (retval) | 728 | if (retval) |
| 732 | kobject_put(debug_kobj); | 729 | sysfs_remove_mount_point(kernel_kobj, "debug"); |
| 733 | else | 730 | else |
| 734 | debugfs_registered = true; | 731 | debugfs_registered = true; |
| 735 | 732 | ||
