summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2015-12-11 15:24:34 -0800
committerBrian Behlendorf <[email protected]>2015-12-14 12:06:31 -0800
commit199766017076de5bddd0dad4f95f29361fc04169 (patch)
treef5db30f485fb80997e1c5c3d07488133362eb820 /module
parent5ed27c572cbb051cbed91a9cce1355312fa7913b (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 155eae2eb..969d6049d 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;
}