Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Oct 2014 10:37:57 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272405 - head/sys/fs/autofs
Message-ID:  <201410021037.s92AbvE3097855@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Thu Oct  2 10:37:56 2014
New Revision: 272405
URL: https://svnweb.freebsd.org/changeset/base/272405

Log:
  Call uma_zfree() outside of lock, and improve comment.
  
  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	Thu Oct  2 10:32:24 2014	(r272404)
+++ head/sys/fs/autofs/autofs.c	Thu Oct  2 10:37:56 2014	(r272405)
@@ -454,13 +454,13 @@ autofs_trigger_one(struct autofs_node *a
 	if (last) {
 		TAILQ_REMOVE(&autofs_softc->sc_requests, ar, ar_next);
 		/*
-		 * XXX: Is it safe?
+		 * Unlock the sc_lock, so that autofs_task() can complete.
 		 */
 		sx_xunlock(&autofs_softc->sc_lock);
 		taskqueue_cancel_timeout(taskqueue_thread, &ar->ar_task, NULL);
 		taskqueue_drain_timeout(taskqueue_thread, &ar->ar_task);
-		sx_xlock(&autofs_softc->sc_lock);
 		uma_zfree(autofs_request_zone, ar);
+		sx_xlock(&autofs_softc->sc_lock);
 	}
 
 	/*



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