svn commit: r213529 - head/sbin/hastd

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Oct 7 18:16:23 UTC 2010


Author: pjd
Date: Thu Oct  7 18:16:22 2010
New Revision: 213529
URL: http://svn.freebsd.org/changeset/base/213529

Log:
  Don't close local component on exit as we can hang waiting on g_waitidle.
  I'm unable to reproduce the race described in comment anymore and also the
  comment is incorrect - localfd represents local component from configuration
  file, eg. /dev/da0 and not HAST provider.
  
  Reported by:	Mikolaj Golub <to.my.trociny at gmail.com>
  MFC after:	1 week

Modified:
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Thu Oct  7 18:16:14 2010	(r213528)
+++ head/sbin/hastd/primary.c	Thu Oct  7 18:16:22 2010	(r213529)
@@ -234,12 +234,6 @@ cleanup(struct hast_resource *res)
 	/* Remember errno. */
 	rerrno = errno;
 
-	/*
-	 * Close descriptor to /dev/hast/<name>
-	 * to work-around race in the kernel.
-	 */
-	close(res->hr_localfd);
-
 	/* Destroy ggate provider if we created one. */
 	if (res->hr_ggateunit >= 0) {
 		struct g_gate_ctl_destroy ggiod;


More information about the svn-src-all mailing list