]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mountd/cache.c
mountd: prefer non-V4ROOT exports.
[nfs-utils.git] / utils / mountd / cache.c
index 2468bc5916084e06323341ed6aeab006378beef9..d63e10ae1faf431d190e1c1ba5ca2c742eb038a2 100644 (file)
@@ -657,6 +657,11 @@ static nfs_export *lookup_export(char *dom, char *path, struct hostent *he)
                                found_type = i;
                                continue;
                        }
+
+                       /* Always prefer non-V4ROOT mounts */
+                       if (found->m_export.e_flags & NFSEXP_V4ROOT)
+                               continue;
+
                        /* If one is a CROSSMOUNT, then prefer the longest path */
                        if (((found->m_export.e_flags & NFSEXP_CROSSMOUNT) ||
                             (exp->m_export.e_flags & NFSEXP_CROSSMOUNT)) &&