summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2015-12-11 15:24:34 -0800
committerNed Bass <[email protected]>2015-12-23 17:29:34 -0800
commit813a4af70e2f768708ecc4a76c6fa3eecc7a7471 (patch)
treeea3194b33b9025856ba4de57621014986d6d593c /module
parente16c04d643d91806d400e825ef3cc5705d3dc10b (diff)
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 <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module')
-rw-r--r--module/zfs/zfs_ctldir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c
index 1b62b51f8..0bfbd7543 100644
--- a/module/zfs/zfs_ctldir.c
+++ b/module/zfs/zfs_ctldir.c
@@ -1094,7 +1094,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;
}