diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-26 08:21:33 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:17:21 -0400 |
commit | 061dbc6b9010bc1a30ef9a1da5469aefa83abd7f (patch) | |
tree | 34d4daddc92d881d1836880e03f0ec82a742f90e /fs | |
parent | a7f9fb205a88ab9af675a68fc554cf51dafc8b60 (diff) |
convert btrfs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-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 | }; |