]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mountd/v4root.c
mountd: minor optimization in v4root_set
[nfs-utils.git] / utils / mountd / v4root.c
index d890181b5f2fab86ce60c26978884aab25e624fb..b0a10c8d319338eb3e6d90b408f004ff77d4007a 100644 (file)
@@ -162,6 +162,13 @@ v4root_set()
                        nxt = exp->m_next;
                        hostname = exp->m_export.e_hostname;
 
+                       if (exp->m_export.e_flags & NFSEXP_V4ROOT)
+                               /*
+                                * We just added this one, so its
+                                * parents are already dealt with!
+                                */
+                               continue;
+
                        path = strdup(exp->m_export.e_path);
                        for (ptr = path + 1; ptr; ptr = strchr(ptr, '/')) {
                                int ret;