aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/hypfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/hypfs/inode.c')
-rw-r--r--arch/s390/hypfs/inode.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index 98a4a4c267a7..6fe874fc5f8e 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -46,8 +46,6 @@ static const struct super_operations hypfs_s_ops;
46/* start of list of all dentries, which have to be deleted on update */ 46/* start of list of all dentries, which have to be deleted on update */
47static struct dentry *hypfs_last_dentry; 47static struct dentry *hypfs_last_dentry;
48 48
49struct dentry *hypfs_dbfs_dir;
50
51static void hypfs_update_update(struct super_block *sb) 49static void hypfs_update_update(struct super_block *sb)
52{ 50{
53 struct hypfs_sb_info *sb_info = sb->s_fs_info; 51 struct hypfs_sb_info *sb_info = sb->s_fs_info;
@@ -316,10 +314,10 @@ static int hypfs_fill_super(struct super_block *sb, void *data, int silent)
316 return 0; 314 return 0;
317} 315}
318 316
319static int hypfs_get_super(struct file_system_type *fst, int flags, 317static struct dentry *hypfs_mount(struct file_system_type *fst, int flags,
320 const char *devname, void *data, struct vfsmount *mnt) 318 const char *devname, void *data)
321{ 319{
322 return get_sb_single(fst, flags, data, hypfs_fill_super, mnt); 320 return mount_single(fst, flags, data, hypfs_fill_super);
323} 321}
324 322
325static void hypfs_kill_super(struct super_block *sb) 323static void hypfs_kill_super(struct super_block *sb)
@@ -449,12 +447,13 @@ static const struct file_operations hypfs_file_ops = {
449 .write = do_sync_write, 447 .write = do_sync_write,
450 .aio_read = hypfs_aio_read, 448 .aio_read = hypfs_aio_read,
451 .aio_write = hypfs_aio_write, 449 .aio_write = hypfs_aio_write,
450 .llseek = no_llseek,
452}; 451};
453 452
454static struct file_system_type hypfs_type = { 453static struct file_system_type hypfs_type = {
455 .owner = THIS_MODULE, 454 .owner = THIS_MODULE,
456 .name = "s390_hypfs", 455 .name = "s390_hypfs",
457 .get_sb = hypfs_get_super, 456 .mount = hypfs_mount,
458 .kill_sb = hypfs_kill_super 457 .kill_sb = hypfs_kill_super
459}; 458};
460 459
@@ -470,13 +469,12 @@ static int __init hypfs_init(void)
470{ 469{
471 int rc; 470 int rc;
472 471
473 hypfs_dbfs_dir = debugfs_create_dir("s390_hypfs", NULL); 472 rc = hypfs_dbfs_init();
474 if (IS_ERR(hypfs_dbfs_dir)) 473 if (rc)
475 return PTR_ERR(hypfs_dbfs_dir); 474 return rc;
476
477 if (hypfs_diag_init()) { 475 if (hypfs_diag_init()) {
478 rc = -ENODATA; 476 rc = -ENODATA;
479 goto fail_debugfs_remove; 477 goto fail_dbfs_exit;
480 } 478 }
481 if (hypfs_vm_init()) { 479 if (hypfs_vm_init()) {
482 rc = -ENODATA; 480 rc = -ENODATA;
@@ -498,9 +496,8 @@ fail_hypfs_vm_exit:
498 hypfs_vm_exit(); 496 hypfs_vm_exit();
499fail_hypfs_diag_exit: 497fail_hypfs_diag_exit:
500 hypfs_diag_exit(); 498 hypfs_diag_exit();
501fail_debugfs_remove: 499fail_dbfs_exit:
502 debugfs_remove(hypfs_dbfs_dir); 500 hypfs_dbfs_exit();
503
504 pr_err("Initialization of hypfs failed with rc=%i\n", rc); 501 pr_err("Initialization of hypfs failed with rc=%i\n", rc);
505 return rc; 502 return rc;
506} 503}
@@ -509,7 +506,7 @@ static void __exit hypfs_exit(void)
509{ 506{
510 hypfs_diag_exit(); 507 hypfs_diag_exit();
511 hypfs_vm_exit(); 508 hypfs_vm_exit();
512 debugfs_remove(hypfs_dbfs_dir); 509 hypfs_dbfs_exit();
513 unregister_filesystem(&hypfs_type); 510 unregister_filesystem(&hypfs_type);
514 kobject_put(s390_kobj); 511 kobject_put(s390_kobj);
515} 512}