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> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
e16c04d643
commit
813a4af70e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue