Date: Mon, 1 Jun 2009 10:49:56 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 163247 for review Message-ID: <200906011049.n51Anud9056270@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=163247 Change 163247 by zec@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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906011049.n51Anud9056270>
