summaryrefslogtreecommitdiff
path: root/fs/pstore
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-05-14 01:35:41 +0300
committerEric W. Biederman <ebiederm@xmission.com>2015-07-01 18:36:47 +0300
commitf9bb48825a6b5d02f4cabcc78967c75db903dcdc (patch)
tree4883ba33a67bb07e6c9611b4b7a818c428c73ec7 /fs/pstore
parent87d2846fcf88113fae2341da1ca9a71f0d916f2c (diff)
downloadlinux-f9bb48825a6b5d02f4cabcc78967c75db903dcdc.tar.xz
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/pstore')
-rw-r--r--fs/pstore/inode.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index dc43b5f29305..3adcc4669fac 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -461,22 +461,18 @@ static struct file_system_type pstore_fs_type = {
.kill_sb = pstore_kill_sb,
};
-static struct kobject *pstore_kobj;
-
static int __init init_pstore_fs(void)
{
- int err = 0;
+ int err;
/* Create a convenient mount point for people to access pstore */
- pstore_kobj = kobject_create_and_add("pstore", fs_kobj);
- if (!pstore_kobj) {
- err = -ENOMEM;
+ err = sysfs_create_mount_point(fs_kobj, "pstore");
+ if (err)
goto out;
- }
err = register_filesystem(&pstore_fs_type);
if (err < 0)
- kobject_put(pstore_kobj);
+ sysfs_remove_mount_point(fs_kobj, "pstore");
out:
return err;