diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-05-13 18:35:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-07-21 13:10:01 -0400 |
commit | 28dd1f346b2f0fc2ab8285046ed0bd91e9b808d3 (patch) | |
tree | 7c2a4337b103067684f0345283d19c8e8e62afb2 /arch | |
parent | 9924f6e89823a41bfd272ab759636276b9f9ee9c (diff) |
sysfs: Create mountpoints with sysfs_create_mount_point
commit f9bb48825a6b5d02f4cabcc78967c75db903dcdc upstream.
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
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/hypfs/inode.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index d3f896a35b98..2eeb0a0f506d 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c | |||
@@ -456,8 +456,6 @@ static const struct super_operations hypfs_s_ops = { | |||
456 | .show_options = hypfs_show_options, | 456 | .show_options = hypfs_show_options, |
457 | }; | 457 | }; |
458 | 458 | ||
459 | static struct kobject *s390_kobj; | ||
460 | |||
461 | static int __init hypfs_init(void) | 459 | static int __init hypfs_init(void) |
462 | { | 460 | { |
463 | int rc; | 461 | int rc; |
@@ -481,18 +479,16 @@ static int __init hypfs_init(void) | |||
481 | rc = -ENODATA; | 479 | rc = -ENODATA; |
482 | goto fail_hypfs_sprp_exit; | 480 | goto fail_hypfs_sprp_exit; |
483 | } | 481 | } |
484 | s390_kobj = kobject_create_and_add("s390", hypervisor_kobj); | 482 | rc = sysfs_create_mount_point(hypervisor_kobj, "s390"); |
485 | if (!s390_kobj) { | 483 | if (rc) |
486 | rc = -ENOMEM; | ||
487 | goto fail_hypfs_diag0c_exit; | 484 | goto fail_hypfs_diag0c_exit; |
488 | } | ||
489 | rc = register_filesystem(&hypfs_type); | 485 | rc = register_filesystem(&hypfs_type); |
490 | if (rc) | 486 | if (rc) |
491 | goto fail_filesystem; | 487 | goto fail_filesystem; |
492 | return 0; | 488 | return 0; |
493 | 489 | ||
494 | fail_filesystem: | 490 | fail_filesystem: |
495 | kobject_put(s390_kobj); | 491 | sysfs_remove_mount_point(hypervisor_kobj, "s390"); |
496 | fail_hypfs_diag0c_exit: | 492 | fail_hypfs_diag0c_exit: |
497 | hypfs_diag0c_exit(); | 493 | hypfs_diag0c_exit(); |
498 | fail_hypfs_sprp_exit: | 494 | fail_hypfs_sprp_exit: |
@@ -510,7 +506,7 @@ fail_dbfs_exit: | |||
510 | static void __exit hypfs_exit(void) | 506 | static void __exit hypfs_exit(void) |
511 | { | 507 | { |
512 | unregister_filesystem(&hypfs_type); | 508 | unregister_filesystem(&hypfs_type); |
513 | kobject_put(s390_kobj); | 509 | sysfs_remove_mount_point(hypervisor_kobj, "s390"); |
514 | hypfs_diag0c_exit(); | 510 | hypfs_diag0c_exit(); |
515 | hypfs_sprp_exit(); | 511 | hypfs_sprp_exit(); |
516 | hypfs_vm_exit(); | 512 | hypfs_vm_exit(); |