Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Mar 2015 19:41:58 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r279744 - stable/10/usr.sbin/autofs
Message-ID:  <201503071941.t27JfwK5026178@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Sat Mar  7 19:41:58 2015
New Revision: 279744
URL: https://svnweb.freebsd.org/changeset/base/279744

Log:
  MFC r275756:
  
  Fix bug that made automount(8) never unmount stale autofs(5) mounts,
  ie mounts for entries that were there in auto_master(5), and then
  got removed.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/usr.sbin/autofs/common.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/autofs/common.c
==============================================================================
--- stable/10/usr.sbin/autofs/common.c	Sat Mar  7 19:39:16 2015	(r279743)
+++ stable/10/usr.sbin/autofs/common.c	Sat Mar  7 19:41:58 2015	(r279744)
@@ -676,8 +676,8 @@ node_print(const struct node *n)
 		node_print_indent(child, 0);
 }
 
-struct node *
-node_find(struct node *node, const char *path)
+static struct node *
+node_find_x(struct node *node, const char *path)
 {
 	struct node *child, *found;
 	char *tmp;
@@ -702,7 +702,7 @@ node_find(struct node *node, const char 
 	free(tmp);
 
 	TAILQ_FOREACH(child, &node->n_children, n_next) {
-		found = node_find(child, path);
+		found = node_find_x(child, path);
 		if (found != NULL)
 			return (found);
 	}
@@ -710,6 +710,17 @@ node_find(struct node *node, const char 
 	return (node);
 }
 
+struct node *
+node_find(struct node *root, const char *path)
+{
+	struct node *node;
+
+	node = node_find_x(root, path);
+	if (node == root)
+		return (NULL);
+	return (node);
+}
+
 /*
  * Canonical form of a map entry looks like this:
  *



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503071941.t27JfwK5026178>