diff --git a/CHANGELOG b/CHANGELOG index be50aad..3557b16 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -45,6 +45,7 @@ - update negative mount timeout handling. - fix large group handling (Ryan Thomas). - fix for dynamic logging breaking non-sasl build (Guillaume Rousse) +- eliminate NULL proc ping for singleton host or local mounts. 18/06/2007 autofs-5.0.2 ----------------------- diff --git a/modules/replicated.c b/modules/replicated.c index 14b20a9..90b2925 100644 --- a/modules/replicated.c +++ b/modules/replicated.c @@ -725,19 +725,21 @@ int prune_host_list(unsigned logopt, struct host **list, while (this && this->proximity == PROXIMITY_LOCAL) this = this->next; - proximity = PROXIMITY_LOCAL; - if (this) - proximity = this->proximity; + /* + * Check for either a list containing only proximity local hosts + * or a single host entry whose proximity isn't local. If so + * return immediately as we don't want to add probe latency for + * the common case of a single filesystem mount request. + */ + if (!this || !this->next) + return 1; + proximity = this->proximity; + first = this; this = first; while (this) { struct host *next = this->next; - if (this->proximity == PROXIMITY_LOCAL) { - this = next; - continue; - } - if (this->proximity != proximity) break; @@ -758,10 +760,6 @@ int prune_host_list(unsigned logopt, struct host **list, last = this; - /* If there are only local entries on the list, just return it. */ - if (!first) - return 0; - /* Select NFS version of highest number of closest servers */ v4_tcp_count = v3_tcp_count = v2_tcp_count = 0;