Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 2009 20:30:08 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 163520 for review
Message-ID:  <200906042030.n54KU8PH033256@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=163520

Change 163520 by zec@zec_amdx4 on 2009/06/04 20:29:14

	Trim comments.

Affected files ...

.. //depot/projects/vimage-commit2/src/sys/kern/kern_vimage.c#50 edit

Differences ...

==== //depot/projects/vimage-commit2/src/sys/kern/kern_vimage.c#50 (text+ko) ====

@@ -660,9 +660,8 @@
 }
 
 /*
- * Destroy a vnet - unlink all linked lists, free all the memory, stop all
- * the timers... How can one ever be sure to have done *all* the necessary
- * steps?
+ * Destroy a vnet - unlink all linked lists, hashtables etc., free all
+ * the memory, stop all the timers...
  */
 static int
 vi_destroy(struct vimage *vip)
@@ -687,11 +686,8 @@
 		    vip->vi_name, vip->vi_ucredrefc);
 
 	/* Point with no return - cleanup MUST succeed! */
-	/* XXX locking */
 	LIST_REMOVE(vip, vi_le);
 	LIST_REMOVE(vip, vi_sibling);
-
-	/* XXX locking */
 	LIST_REMOVE(vprocg, vprocg_le);
 
 	VNET_LIST_WLOCK();
@@ -701,10 +697,7 @@
 	CURVNET_SET_QUIET(vnet);
 	INIT_VNET_NET(vnet);
 
-	/*
-	 * Return all inherited interfaces to their parent vnets,
-	 * alternatively attempt to kill cloning ifnets.
-	 */
+	/* Return all inherited interfaces to their parent vnets. */
 	TAILQ_FOREACH_SAFE(ifp, &V_ifnet, if_link, nifp) {
 		if (ifp->if_home_vnet != ifp->if_vnet)
 			vi_if_move(NULL, ifp, vip);
@@ -717,7 +710,7 @@
 
 	CURVNET_RESTORE();
 
-	/* hopefully, we are finally OK to free the vnet container itself! */
+	/* Hopefully, we are OK to free the vnet container itself. */
 	vnet->vnet_magic_n = 0xdeadbeef;
 	free(vnet, M_VNET);
 	free(vprocg, M_VPROCG);



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