From 35b8ee6be36a43c79cb596007d2835ebb9caad67 Mon Sep 17 00:00:00 2001 From: Terra Date: Sun, 23 Feb 2020 18:24:11 -0500 Subject: [PATCH] From 64c5c8750d738ecc502b6a0192feebf33914acbe Mon Sep 17 00:00:00 2001 Subject: [PATCH] Revert "Let zfs mount all tolerate in-progress mounts" This reverts commit a9cd8bfde73a78a0ba02e25b712fe28d11019191. REF: https://github.com/zfsonlinux/zfs/issues/9560 --- cmd/zfs/zfs_main.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 3a91795f2ace..088a0b39a04d 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -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; }