Created
December 11, 2015 23:31
-
-
Save tuxoko/5abf0535b963416795c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From f3ac39e16ff20b635e7d8773a4a32a357893aa7f Mon Sep 17 00:00:00 2001 | |
From: Chunwei Chen <david.chen@osnexus.com> | |
Date: Fri, 11 Dec 2015 15:24:34 -0800 | |
Subject: [PATCH] Fix snapshot automount race cause EREMOTE | |
When a concorrent mount finishes just before calling to | |
zfsctl_snapshot_ismounted, if we return EISDIR, the VFS will return with | |
EREMOTE. We should instead just return 0, so VFS may retry and would likely | |
notice the dentry is alreadly mounted. This will be inline with when usermode | |
helper return EBUSY. | |
Signed-off-by: Chunwei Chen <david.chen@osnexus.com> | |
--- | |
module/zfs/zfs_ctldir.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c | |
index b03c4e5..84466b8 100644 | |
--- a/module/zfs/zfs_ctldir.c | |
+++ b/module/zfs/zfs_ctldir.c | |
@@ -1086,7 +1086,7 @@ zfsctl_snapshot_mount(struct path *path, int flags) | |
* The snapshot may be manually mounted as many times as desired. | |
*/ | |
if (zfsctl_snapshot_ismounted(full_name)) { | |
- error = SET_ERROR(EISDIR); | |
+ error = 0; | |
goto error; | |
} | |
-- | |
1.9.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment