diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-25 15:52:42 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:16:36 -0400 |
commit | 157d81e7ffe04f2c97c3580e185787c2d29463bb (patch) | |
tree | a6e5bb27ddc0cd3d4692d6e325b62894f240a45a /fs/ubifs/super.c | |
parent | 51139adac92f7160ad3ca1cab2de1b4b8d19dc96 (diff) |
convert ubifs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 9a47c9f0ad07..91fac54c70e3 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -2038,8 +2038,8 @@ static int sb_test(struct super_block *sb, void *data) | |||
2038 | return c->vi.cdev == *dev; | 2038 | return c->vi.cdev == *dev; |
2039 | } | 2039 | } |
2040 | 2040 | ||
2041 | static int ubifs_get_sb(struct file_system_type *fs_type, int flags, | 2041 | static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags, |
2042 | const char *name, void *data, struct vfsmount *mnt) | 2042 | const char *name, void *data) |
2043 | { | 2043 | { |
2044 | struct ubi_volume_desc *ubi; | 2044 | struct ubi_volume_desc *ubi; |
2045 | struct ubi_volume_info vi; | 2045 | struct ubi_volume_info vi; |
@@ -2057,7 +2057,7 @@ static int ubifs_get_sb(struct file_system_type *fs_type, int flags, | |||
2057 | if (IS_ERR(ubi)) { | 2057 | if (IS_ERR(ubi)) { |
2058 | dbg_err("cannot open \"%s\", error %d", | 2058 | dbg_err("cannot open \"%s\", error %d", |
2059 | name, (int)PTR_ERR(ubi)); | 2059 | name, (int)PTR_ERR(ubi)); |
2060 | return PTR_ERR(ubi); | 2060 | return ERR_CAST(ubi); |
2061 | } | 2061 | } |
2062 | ubi_get_volume_info(ubi, &vi); | 2062 | ubi_get_volume_info(ubi, &vi); |
2063 | 2063 | ||
@@ -2095,20 +2095,19 @@ static int ubifs_get_sb(struct file_system_type *fs_type, int flags, | |||
2095 | /* 'fill_super()' opens ubi again so we must close it here */ | 2095 | /* 'fill_super()' opens ubi again so we must close it here */ |
2096 | ubi_close_volume(ubi); | 2096 | ubi_close_volume(ubi); |
2097 | 2097 | ||
2098 | simple_set_mnt(mnt, sb); | 2098 | return dget(sb->s_root); |
2099 | return 0; | ||
2100 | 2099 | ||
2101 | out_deact: | 2100 | out_deact: |
2102 | deactivate_locked_super(sb); | 2101 | deactivate_locked_super(sb); |
2103 | out_close: | 2102 | out_close: |
2104 | ubi_close_volume(ubi); | 2103 | ubi_close_volume(ubi); |
2105 | return err; | 2104 | return ERR_PTR(err); |
2106 | } | 2105 | } |
2107 | 2106 | ||
2108 | static struct file_system_type ubifs_fs_type = { | 2107 | static struct file_system_type ubifs_fs_type = { |
2109 | .name = "ubifs", | 2108 | .name = "ubifs", |
2110 | .owner = THIS_MODULE, | 2109 | .owner = THIS_MODULE, |
2111 | .get_sb = ubifs_get_sb, | 2110 | .mount = ubifs_mount, |
2112 | .kill_sb = kill_anon_super, | 2111 | .kill_sb = kill_anon_super, |
2113 | }; | 2112 | }; |
2114 | 2113 | ||