Revert "Make mount.zfs(8) calling zfs_mount_at for legacy mounts"
This reverts commit 34118eac06
.
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
This commit is contained in:
parent
cfa06493fa
commit
b65aeb44ee
|
@ -269,7 +269,8 @@ main(int argc, char **argv)
|
||||||
return (MOUNT_USAGE);
|
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);
|
zfs_adjust_mount_options(zhp, mntpoint, mntopts, mtabopt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,7 +337,7 @@ main(int argc, char **argv)
|
||||||
dataset, mntpoint, mntflags, zfsflags, mntopts, mtabopt);
|
dataset, mntpoint, mntflags, zfsflags, mntopts, mtabopt);
|
||||||
|
|
||||||
if (!fake) {
|
if (!fake) {
|
||||||
if (!remount && !sloppy &&
|
if (zfsutil && !sloppy &&
|
||||||
!libzfs_envvar_is_set("ZFS_MOUNT_HELPER")) {
|
!libzfs_envvar_is_set("ZFS_MOUNT_HELPER")) {
|
||||||
error = zfs_mount_at(zhp, mntopts, mntflags, mntpoint);
|
error = zfs_mount_at(zhp, mntopts, mntflags, mntpoint);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|
|
@ -1101,8 +1101,8 @@ zfsctl_snapshot_mount(struct path *path, int flags)
|
||||||
zfsvfs_t *snap_zfsvfs;
|
zfsvfs_t *snap_zfsvfs;
|
||||||
zfs_snapentry_t *se;
|
zfs_snapentry_t *se;
|
||||||
char *full_name, *full_path;
|
char *full_name, *full_path;
|
||||||
char *argv[] = { "/usr/bin/env", "mount", "-i", "-t", "zfs", "-n",
|
char *argv[] = { "/usr/bin/env", "mount", "-t", "zfs", "-n", NULL, NULL,
|
||||||
NULL, NULL, NULL };
|
NULL };
|
||||||
char *envp[] = { NULL };
|
char *envp[] = { NULL };
|
||||||
int error;
|
int error;
|
||||||
struct path spath;
|
struct path spath;
|
||||||
|
@ -1153,8 +1153,8 @@ zfsctl_snapshot_mount(struct path *path, int flags)
|
||||||
* value from call_usermodehelper() will be (exitcode << 8 + signal).
|
* value from call_usermodehelper() will be (exitcode << 8 + signal).
|
||||||
*/
|
*/
|
||||||
dprintf("mount; name=%s path=%s\n", full_name, full_path);
|
dprintf("mount; name=%s path=%s\n", full_name, full_path);
|
||||||
argv[6] = full_name;
|
argv[5] = full_name;
|
||||||
argv[7] = full_path;
|
argv[6] = full_path;
|
||||||
error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
|
error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
|
||||||
if (error) {
|
if (error) {
|
||||||
if (!(error & MOUNT_BUSY << 8)) {
|
if (!(error & MOUNT_BUSY << 8)) {
|
||||||
|
|
Loading…
Reference in New Issue