Skip to content

Commit e4c59d6

Browse files
author
Al Viro
committed
convert nilfs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent a1da9e8 commit e4c59d6

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

‎fs/nilfs2/super.c‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,9 +1141,9 @@ static int nilfs_test_bdev_super(struct super_block *s, void *data)
11411141
return (void *)s->s_bdev == data;
11421142
}
11431143

1144-
static int
1145-
nilfs_get_sb(struct file_system_type *fs_type, int flags,
1146-
const char *dev_name, void *data, struct vfsmount *mnt)
1144+
static struct dentry *
1145+
nilfs_mount(struct file_system_type *fs_type, int flags,
1146+
const char *dev_name, void *data)
11471147
{
11481148
struct nilfs_super_data sd;
11491149
struct super_block *s;
@@ -1156,7 +1156,7 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,
11561156

11571157
sd.bdev = open_bdev_exclusive(dev_name, mode, fs_type);
11581158
if (IS_ERR(sd.bdev))
1159-
return PTR_ERR(sd.bdev);
1159+
return ERR_CAST(sd.bdev);
11601160

11611161
sd.cno = 0;
11621162
sd.flags = flags;
@@ -1235,23 +1235,21 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,
12351235
if (!s_new)
12361236
close_bdev_exclusive(sd.bdev, mode);
12371237

1238-
mnt->mnt_sb = s;
1239-
mnt->mnt_root = root_dentry;
1240-
return 0;
1238+
return root_dentry;
12411239

12421240
failed_super:
12431241
deactivate_locked_super(s);
12441242

12451243
failed:
12461244
if (!s_new)
12471245
close_bdev_exclusive(sd.bdev, mode);
1248-
return err;
1246+
return ERR_PTR(err);
12491247
}
12501248

12511249
struct file_system_type nilfs_fs_type = {
12521250
.owner = THIS_MODULE,
12531251
.name = "nilfs2",
1254-
.get_sb = nilfs_get_sb,
1252+
.mount = nilfs_mount,
12551253
.kill_sb = kill_block_super,
12561254
.fs_flags = FS_REQUIRES_DEV,
12571255
};

0 commit comments

Comments
 (0)