svn commit: r270399 - head/sys/fs/autofs

Edward Tomasz Napierala trasz at FreeBSD.org
Sat Aug 23 11:38:32 UTC 2014


Author: trasz
Date: Sat Aug 23 11:38:31 2014
New Revision: 270399
URL: http://svnweb.freebsd.org/changeset/base/270399

Log:
  Add comment explaining one of the quirks in autofs.
  
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/fs/autofs/autofs.c

Modified: head/sys/fs/autofs/autofs.c
==============================================================================
--- head/sys/fs/autofs/autofs.c	Sat Aug 23 11:34:56 2014	(r270398)
+++ head/sys/fs/autofs/autofs.c	Sat Aug 23 11:38:31 2014	(r270399)
@@ -595,6 +595,14 @@ autofs_open(struct cdev *dev, int flags,
 {
 
 	sx_xlock(&sc->sc_lock);
+	/*
+	 * We must never block automountd(8) and its descendants, and we use
+	 * session ID to determine that: we store session id of the process
+	 * that opened the device, and then compare it with session ids
+	 * of triggering processes.  This means running a second automountd(8)
+	 * instance would break the previous one.  The check below prevents
+	 * it from happening.
+	 */
 	if (sc->sc_dev_opened) {
 		sx_xunlock(&sc->sc_lock);
 		return (EBUSY);


More information about the svn-src-all mailing list