Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions config/kernel-sget-args.m4

This file was deleted.

2 changes: 0 additions & 2 deletions config/kernel.m4
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
ZFS_AC_KERNEL_SRC_FS_PARSE
ZFS_AC_KERNEL_SRC_SB_DYING
ZFS_AC_KERNEL_SRC_SET_NLINK
ZFS_AC_KERNEL_SRC_SGET
ZFS_AC_KERNEL_SRC_VFS_FILEMAP_DIRTY_FOLIO
ZFS_AC_KERNEL_SRC_VFS_READ_FOLIO
ZFS_AC_KERNEL_SRC_VFS_MIGRATE_FOLIO
Expand Down Expand Up @@ -205,7 +204,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
ZFS_AC_KERNEL_FS_PARSE
ZFS_AC_KERNEL_SB_DYING
ZFS_AC_KERNEL_SET_NLINK
ZFS_AC_KERNEL_SGET
ZFS_AC_KERNEL_VFS_FILEMAP_DIRTY_FOLIO
ZFS_AC_KERNEL_VFS_READ_FOLIO
ZFS_AC_KERNEL_VFS_MIGRATE_FOLIO
Expand Down
13 changes: 7 additions & 6 deletions module/os/linux/zfs/zpl_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,10 @@ zpl_show_options(struct seq_file *seq, struct dentry *root)
}

static int
zpl_test_super(struct super_block *s, void *data)
zpl_test_super(struct super_block *s, struct fs_context *fc)
{
zfsvfs_t *zfsvfs = s->s_fs_info;
objset_t *os = data;
objset_t *os = fc->sget_key;
/*
* If the os doesn't match the z_os in the super_block, assume it is
* not a match. Matching would imply a multimount of a dataset. It is
Expand Down Expand Up @@ -859,17 +859,18 @@ zpl_get_tree(struct fs_context *fc)
return (-err);

/*
* The dsl pool lock must be released prior to calling sget().
* It is possible sget() may block on the lock in grab_super()
* The dsl pool lock must be released prior to calling sget_fc().
* It is possible sget_fc() may block on the lock in grab_super()
* while deactivate_super() holds that same lock and waits for
* a txg sync. If the dsl_pool lock is held over sget()
* this can prevent the pool sync and cause a deadlock.
*/
dsl_dataset_long_hold(dmu_objset_ds(os), FTAG);
dsl_pool_rele(dmu_objset_pool(os), FTAG);

sb = sget(fc->fs_type, zpl_test_super, set_anon_super,
fc->sb_flags, os);
fc->sget_key = os;
sb = sget_fc(fc, zpl_test_super, set_anon_super_fc);
fc->sget_key = NULL;

/*
* Recheck with the lock held to prevent mounting the wrong dataset
Expand Down
Loading