diff options
-rw-r--r-- | fs/nilfs2/super.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 35ae03c0db86..f804d41ec9d3 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c | |||
@@ -1141,9 +1141,9 @@ static int nilfs_test_bdev_super(struct super_block *s, void *data) | |||
1141 | return (void *)s->s_bdev == data; | 1141 | return (void *)s->s_bdev == data; |
1142 | } | 1142 | } |
1143 | 1143 | ||
1144 | static int | 1144 | static struct dentry * |
1145 | nilfs_get_sb(struct file_system_type *fs_type, int flags, | 1145 | nilfs_mount(struct file_system_type *fs_type, int flags, |
1146 | const char *dev_name, void *data, struct vfsmount *mnt) | 1146 | const char *dev_name, void *data) |
1147 | { | 1147 | { |
1148 | struct nilfs_super_data sd; | 1148 | struct nilfs_super_data sd; |
1149 | struct super_block *s; | 1149 | struct super_block *s; |
@@ -1156,7 +1156,7 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags, | |||
1156 | 1156 | ||
1157 | sd.bdev = open_bdev_exclusive(dev_name, mode, fs_type); | 1157 | sd.bdev = open_bdev_exclusive(dev_name, mode, fs_type); |
1158 | if (IS_ERR(sd.bdev)) | 1158 | if (IS_ERR(sd.bdev)) |
1159 | return PTR_ERR(sd.bdev); | 1159 | return ERR_CAST(sd.bdev); |
1160 | 1160 | ||
1161 | sd.cno = 0; | 1161 | sd.cno = 0; |
1162 | sd.flags = flags; | 1162 | sd.flags = flags; |
@@ -1235,9 +1235,7 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags, | |||
1235 | if (!s_new) | 1235 | if (!s_new) |
1236 | close_bdev_exclusive(sd.bdev, mode); | 1236 | close_bdev_exclusive(sd.bdev, mode); |
1237 | 1237 | ||
1238 | mnt->mnt_sb = s; | 1238 | return root_dentry; |
1239 | mnt->mnt_root = root_dentry; | ||
1240 | return 0; | ||
1241 | 1239 | ||
1242 | failed_super: | 1240 | failed_super: |
1243 | deactivate_locked_super(s); | 1241 | deactivate_locked_super(s); |
@@ -1245,13 +1243,13 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags, | |||
1245 | failed: | 1243 | failed: |
1246 | if (!s_new) | 1244 | if (!s_new) |
1247 | close_bdev_exclusive(sd.bdev, mode); | 1245 | close_bdev_exclusive(sd.bdev, mode); |
1248 | return err; | 1246 | return ERR_PTR(err); |
1249 | } | 1247 | } |
1250 | 1248 | ||
1251 | struct file_system_type nilfs_fs_type = { | 1249 | struct file_system_type nilfs_fs_type = { |
1252 | .owner = THIS_MODULE, | 1250 | .owner = THIS_MODULE, |
1253 | .name = "nilfs2", | 1251 | .name = "nilfs2", |
1254 | .get_sb = nilfs_get_sb, | 1252 | .mount = nilfs_mount, |
1255 | .kill_sb = kill_block_super, | 1253 | .kill_sb = kill_block_super, |
1256 | .fs_flags = FS_REQUIRES_DEV, | 1254 | .fs_flags = FS_REQUIRES_DEV, |
1257 | }; | 1255 | }; |