From owner-svn-src-head@FreeBSD.ORG Sat Aug 23 11:38:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43C7D57C; Sat, 23 Aug 2014 11:38:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 300423B1E; Sat, 23 Aug 2014 11:38:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBcWIX060936; Sat, 23 Aug 2014 11:38:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBcWwa060935; Sat, 23 Aug 2014 11:38:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408231138.s7NBcWwa060935@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 23 Aug 2014 11:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270399 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:38:32 -0000 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);