diff options
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/v9fs.c | 16 | ||||
-rw-r--r-- | fs/9p/vfs_super.c | 3 |
2 files changed, 9 insertions, 10 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 1964f98e74be..b85efa773949 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c | |||
@@ -594,21 +594,21 @@ static int __init init_v9fs(void) | |||
594 | int err; | 594 | int err; |
595 | pr_info("Installing v9fs 9p2000 file system support\n"); | 595 | pr_info("Installing v9fs 9p2000 file system support\n"); |
596 | /* TODO: Setup list of registered trasnport modules */ | 596 | /* TODO: Setup list of registered trasnport modules */ |
597 | err = register_filesystem(&v9fs_fs_type); | ||
598 | if (err < 0) { | ||
599 | pr_err("Failed to register filesystem\n"); | ||
600 | return err; | ||
601 | } | ||
602 | 597 | ||
603 | err = v9fs_cache_register(); | 598 | err = v9fs_cache_register(); |
604 | if (err < 0) { | 599 | if (err < 0) { |
605 | pr_err("Failed to register v9fs for caching\n"); | 600 | pr_err("Failed to register v9fs for caching\n"); |
606 | goto out_fs_unreg; | 601 | return err; |
607 | } | 602 | } |
608 | 603 | ||
609 | err = v9fs_sysfs_init(); | 604 | err = v9fs_sysfs_init(); |
610 | if (err < 0) { | 605 | if (err < 0) { |
611 | pr_err("Failed to register with sysfs\n"); | 606 | pr_err("Failed to register with sysfs\n"); |
607 | goto out_cache; | ||
608 | } | ||
609 | err = register_filesystem(&v9fs_fs_type); | ||
610 | if (err < 0) { | ||
611 | pr_err("Failed to register filesystem\n"); | ||
612 | goto out_sysfs_cleanup; | 612 | goto out_sysfs_cleanup; |
613 | } | 613 | } |
614 | 614 | ||
@@ -617,8 +617,8 @@ static int __init init_v9fs(void) | |||
617 | out_sysfs_cleanup: | 617 | out_sysfs_cleanup: |
618 | v9fs_sysfs_cleanup(); | 618 | v9fs_sysfs_cleanup(); |
619 | 619 | ||
620 | out_fs_unreg: | 620 | out_cache: |
621 | unregister_filesystem(&v9fs_fs_type); | 621 | v9fs_cache_unregister(); |
622 | 622 | ||
623 | return err; | 623 | return err; |
624 | } | 624 | } |
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index e55d8f7b2887..8c92a9ba8330 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c | |||
@@ -155,9 +155,8 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags, | |||
155 | goto release_sb; | 155 | goto release_sb; |
156 | } | 156 | } |
157 | 157 | ||
158 | root = d_alloc_root(inode); | 158 | root = d_make_root(inode); |
159 | if (!root) { | 159 | if (!root) { |
160 | iput(inode); | ||
161 | retval = -ENOMEM; | 160 | retval = -ENOMEM; |
162 | goto release_sb; | 161 | goto release_sb; |
163 | } | 162 | } |