Skip to content

Commit

Permalink
Revert "Make mount.zfs(8) calling zfs_mount_at for legacy mounts as w…
Browse files Browse the repository at this point in the history
…ell"

This reverts commit 34118ea.

Signed-off-by: Umer Saleem <[email protected]>
  • Loading branch information
usaleem-ix committed Sep 3, 2024
1 parent 1da3556 commit a7ec9dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions cmd/mount_zfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ main(int argc, char **argv)
return (MOUNT_USAGE);
}

if (sloppy || libzfs_envvar_is_set("ZFS_MOUNT_HELPER")) {
if (!zfsutil || sloppy ||
libzfs_envvar_is_set("ZFS_MOUNT_HELPER")) {
zfs_adjust_mount_options(zhp, mntpoint, mntopts, mtabopt);
}

Expand Down Expand Up @@ -336,7 +337,7 @@ main(int argc, char **argv)
dataset, mntpoint, mntflags, zfsflags, mntopts, mtabopt);

if (!fake) {
if (!remount && !sloppy &&
if (zfsutil && !sloppy &&
!libzfs_envvar_is_set("ZFS_MOUNT_HELPER")) {
error = zfs_mount_at(zhp, mntopts, mntflags, mntpoint);
if (error) {
Expand Down
8 changes: 4 additions & 4 deletions module/os/linux/zfs/zfs_ctldir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,8 +1101,8 @@ zfsctl_snapshot_mount(struct path *path, int flags)
zfsvfs_t *snap_zfsvfs;
zfs_snapentry_t *se;
char *full_name, *full_path;
char *argv[] = { "/usr/bin/env", "mount", "-i", "-t", "zfs", "-n",
NULL, NULL, NULL };
char *argv[] = { "/usr/bin/env", "mount", "-t", "zfs", "-n", NULL, NULL,
NULL };
char *envp[] = { NULL };
int error;
struct path spath;
Expand Down Expand Up @@ -1153,8 +1153,8 @@ zfsctl_snapshot_mount(struct path *path, int flags)
* value from call_usermodehelper() will be (exitcode << 8 + signal).
*/
dprintf("mount; name=%s path=%s\n", full_name, full_path);
argv[6] = full_name;
argv[7] = full_path;
argv[5] = full_name;
argv[6] = full_path;
error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
if (error) {
if (!(error & MOUNT_BUSY << 8)) {
Expand Down

0 comments on commit a7ec9dc

Please sign in to comment.