Skip to content

Commit

Permalink
From 64c5c8750d738ecc502b6a0192feebf33914acbe Mon Sep 17 00:00:00 2001
Browse files Browse the repository at this point in the history
Subject: [PATCH] Revert "Let zfs mount all tolerate in-progress mounts"

This reverts commit a9cd8bf.

REF: openzfs#9560
  • Loading branch information
TerraTech committed Feb 16, 2021
1 parent 6e597a7 commit 35b8ee6
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions cmd/zfs/zfs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6457,25 +6457,8 @@ share_mount_one(zfs_handle_t *zhp, int op, int flags, char *protocol,
return (1);
}

if (zfs_mount(zhp, options, flags) != 0) {
/*
* Check if a mount sneaked in after we checked
*/
if (!explicit &&
libzfs_errno(g_zfs) == EZFS_MOUNTFAILED) {
usleep(10 * MILLISEC);
libzfs_mnttab_cache(g_zfs, B_FALSE);

if (zfs_is_mounted(zhp, NULL)) {
(void) fprintf(stderr, gettext(
"Ignoring previous 'already "
"mounted' error for '%s'\n"),
zfs_get_name(zhp));
return (0);
}
}
if (zfs_mount(zhp, options, flags) != 0)
return (1);
}
break;
}

Expand Down

0 comments on commit 35b8ee6

Please sign in to comment.