diff options
Diffstat (limited to 'fs/btrfs/super.c')
| -rw-r--r-- | fs/btrfs/super.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 144f8a5730f5..ebe46c628748 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
| @@ -560,8 +560,8 @@ static int btrfs_test_super(struct super_block *s, void *data) | |||
| 560 | * Note: This is based on get_sb_bdev from fs/super.c with a few additions | 560 | * Note: This is based on get_sb_bdev from fs/super.c with a few additions |
| 561 | * for multiple device setup. Make sure to keep it in sync. | 561 | * for multiple device setup. Make sure to keep it in sync. |
| 562 | */ | 562 | */ |
| 563 | static int btrfs_get_sb(struct file_system_type *fs_type, int flags, | 563 | static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, |
| 564 | const char *dev_name, void *data, struct vfsmount *mnt) | 564 | const char *dev_name, void *data) |
| 565 | { | 565 | { |
| 566 | struct block_device *bdev = NULL; | 566 | struct block_device *bdev = NULL; |
| 567 | struct super_block *s; | 567 | struct super_block *s; |
| @@ -580,7 +580,7 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, | |||
| 580 | &subvol_name, &subvol_objectid, | 580 | &subvol_name, &subvol_objectid, |
| 581 | &fs_devices); | 581 | &fs_devices); |
| 582 | if (error) | 582 | if (error) |
| 583 | return error; | 583 | return ERR_PTR(error); |
| 584 | 584 | ||
| 585 | error = btrfs_scan_one_device(dev_name, mode, fs_type, &fs_devices); | 585 | error = btrfs_scan_one_device(dev_name, mode, fs_type, &fs_devices); |
| 586 | if (error) | 586 | if (error) |
| @@ -656,11 +656,8 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, | |||
| 656 | root = new_root; | 656 | root = new_root; |
| 657 | } | 657 | } |
| 658 | 658 | ||
| 659 | mnt->mnt_sb = s; | ||
| 660 | mnt->mnt_root = root; | ||
| 661 | |||
| 662 | kfree(subvol_name); | 659 | kfree(subvol_name); |
| 663 | return 0; | 660 | return root; |
| 664 | 661 | ||
| 665 | error_s: | 662 | error_s: |
| 666 | error = PTR_ERR(s); | 663 | error = PTR_ERR(s); |
| @@ -669,7 +666,7 @@ error_close_devices: | |||
| 669 | error_free_subvol_name: | 666 | error_free_subvol_name: |
| 670 | kfree(subvol_name); | 667 | kfree(subvol_name); |
| 671 | error: | 668 | error: |
| 672 | return error; | 669 | return ERR_PTR(error); |
| 673 | } | 670 | } |
| 674 | 671 | ||
| 675 | static int btrfs_remount(struct super_block *sb, int *flags, char *data) | 672 | static int btrfs_remount(struct super_block *sb, int *flags, char *data) |
| @@ -746,7 +743,7 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
| 746 | static struct file_system_type btrfs_fs_type = { | 743 | static struct file_system_type btrfs_fs_type = { |
| 747 | .owner = THIS_MODULE, | 744 | .owner = THIS_MODULE, |
| 748 | .name = "btrfs", | 745 | .name = "btrfs", |
| 749 | .get_sb = btrfs_get_sb, | 746 | .mount = btrfs_mount, |
| 750 | .kill_sb = kill_anon_super, | 747 | .kill_sb = kill_anon_super, |
| 751 | .fs_flags = FS_REQUIRES_DEV, | 748 | .fs_flags = FS_REQUIRES_DEV, |
| 752 | }; | 749 | }; |
