From 3ee08abd2fcef3123188e9ad61a9cd80b9b7831c Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Mon, 16 Mar 2026 19:40:58 +1100 Subject: [PATCH] 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 Signed-off-by: Rob Norris Closes #18339 --- module/os/linux/zfs/zpl_super.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/module/os/linux/zfs/zpl_super.c b/module/os/linux/zfs/zpl_super.c index e404e05ef..a97095953 100644 --- a/module/os/linux/zfs/zpl_super.c +++ b/module/os/linux/zfs/zpl_super.c @@ -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)); } -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 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_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) { deactivate_locked_super(sb); return (-err); } + sb->s_flags |= SB_ACTIVE; } else if (!issnap && ((fc->sb_flags ^ sb->s_flags) & SB_RDONLY)) { /*