X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzpl_ctldir.c;fp=module%2Fzfs%2Fzpl_ctldir.c;h=a2d8fa9fedb58d3b905ffd7c93081c9d2d1bea3e;hb=7afcf5b1da83549bfba70a61fae7a00eaa63c2b0;hp=7dfaf6ebcc456a002d750bfd338efe015ab3d922;hpb=2ae10319624869eef0954cdfcdb6f5e33cba2e09;p=zfs.git diff --git a/module/zfs/zpl_ctldir.c b/module/zfs/zpl_ctldir.c index 7dfaf6e..a2d8fa9 100644 --- a/module/zfs/zpl_ctldir.c +++ b/module/zfs/zpl_ctldir.c @@ -357,6 +357,13 @@ zpl_snapdir_automount(struct path *path) return ERR_PTR(error); /* + * Ensure path->dentry points to the dentry for the root of the + * newly-mounted snapshot, otherwise this function may be called + * repeatedly which can lead to an incorrect ELOOP error return. + */ + follow_up(path); + + /* * Rather than returning the new vfsmount for the snapshot we must * return NULL to indicate a mount collision. This is done because * the user space mount calls do_add_mount() which adds the vfsmount