mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-04-14 07:31:45 +03:00
linux/super: flatten zpl_fill_super into zpl_get_tree
Target of opportunity; with no other callers, there's no need for it to be a static function. Sponsored-by: TrueNAS Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <rob.norris@truenas.com> Closes #18339
This commit is contained in:
parent
96a0b20201
commit
3ee08abd2f
@ -340,21 +340,6 @@ zpl_show_options(struct seq_file *seq, struct dentry *root)
|
|||||||
return (__zpl_show_options(seq, root->d_sb->s_fs_info));
|
return (__zpl_show_options(seq, root->d_sb->s_fs_info));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
zpl_fill_super(struct super_block *sb, void *data, int silent)
|
|
||||||
{
|
|
||||||
zfs_mnt_t *zm = (zfs_mnt_t *)data;
|
|
||||||
fstrans_cookie_t cookie;
|
|
||||||
int error;
|
|
||||||
|
|
||||||
cookie = spl_fstrans_mark();
|
|
||||||
error = -zfs_domount(sb, zm, silent);
|
|
||||||
spl_fstrans_unmark(cookie);
|
|
||||||
ASSERT3S(error, <=, 0);
|
|
||||||
|
|
||||||
return (error);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
zpl_test_super(struct super_block *s, void *data)
|
zpl_test_super(struct super_block *s, void *data)
|
||||||
{
|
{
|
||||||
@ -476,12 +461,16 @@ zpl_get_tree(struct fs_context *fc)
|
|||||||
.mnt_osname = fc->source,
|
.mnt_osname = fc->source,
|
||||||
.mnt_data = fc->fs_private,
|
.mnt_data = fc->fs_private,
|
||||||
};
|
};
|
||||||
err = zpl_fill_super(sb, &zm,
|
|
||||||
fc->sb_flags & SB_SILENT ? 1 : 0);
|
fstrans_cookie_t cookie = spl_fstrans_mark();
|
||||||
|
err = zfs_domount(sb, &zm, fc->sb_flags & SB_SILENT ? 1 : 0);
|
||||||
|
spl_fstrans_unmark(cookie);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
deactivate_locked_super(sb);
|
deactivate_locked_super(sb);
|
||||||
return (-err);
|
return (-err);
|
||||||
}
|
}
|
||||||
|
|
||||||
sb->s_flags |= SB_ACTIVE;
|
sb->s_flags |= SB_ACTIVE;
|
||||||
} else if (!issnap && ((fc->sb_flags ^ sb->s_flags) & SB_RDONLY)) {
|
} else if (!issnap && ((fc->sb_flags ^ sb->s_flags) & SB_RDONLY)) {
|
||||||
/*
|
/*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user