PERFORCE change 163247 for review
Marko Zec
zec at FreeBSD.org
Mon Jun 1 10:49:59 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=163247
Change 163247 by zec at zec_amdx4 on 2009/06/01 10:49:53
Allow for vi_destroy() to be called on vimage -d invocation.
Affected files ...
.. //depot/projects/vimage/src/sys/kern/kern_vimage.c#93 edit
Differences ...
==== //depot/projects/vimage/src/sys/kern/kern_vimage.c#93 (text+ko) ====
@@ -67,6 +67,7 @@
#ifdef VIMAGE
static struct vimage *vimage_by_name(struct vimage *, char *);
static struct vimage *vi_alloc(struct vimage *, char *);
+static int vi_destroy(struct vimage *);
static struct vimage *vimage_get_next(struct vimage *, struct vimage *, int);
static void vimage_relative_name(struct vimage *, struct vimage *,
char *, int);
@@ -216,11 +217,7 @@
case SIOCSPVIMAGE:
if (vi_req->vi_req_action == VI_DESTROY) {
-#ifdef NOTYET
error = vi_destroy(vip_r);
-#else
- error = EOPNOTSUPP;
-#endif
break;
}
@@ -698,9 +695,9 @@
/* XXX locking */
LIST_REMOVE(vprocg, vprocg_le);
- VNET_LIST_LOCK();
+ VNET_LIST_WLOCK();
LIST_REMOVE(vnet, vnet_le);
- VNET_LIST_UNLOCK();
+ VNET_LIST_WUNLOCK();
CURVNET_SET_QUIET(vnet);
INIT_VNET_NET(vnet);
@@ -712,8 +709,10 @@
TAILQ_FOREACH_SAFE(ifp, &V_ifnet, if_link, nifp) {
if (ifp->if_home_vnet != ifp->if_vnet)
vi_if_move(NULL, ifp, vip);
+#ifdef NOTYET
else
if_clone_destroy(ifp->if_xname);
+#endif
}
/* Detach / free per-module state instances. */
More information about the p4-projects
mailing list