svn commit: r192233 - user/kmacy/ZFS_MFC/sys/kern

Kip Macy kmacy at FreeBSD.org
Sat May 16 23:33:08 UTC 2009


Author: kmacy
Date: Sat May 16 23:33:07 2009
New Revision: 192233
URL: http://svn.freebsd.org/changeset/base/192233

Log:
  deregister osd on thread exit

Modified:
  user/kmacy/ZFS_MFC/sys/kern/kern_proc.c
  user/kmacy/ZFS_MFC/sys/kern/kern_thread.c

Modified: user/kmacy/ZFS_MFC/sys/kern/kern_proc.c
==============================================================================
--- user/kmacy/ZFS_MFC/sys/kern/kern_proc.c	Sat May 16 22:54:16 2009	(r192232)
+++ user/kmacy/ZFS_MFC/sys/kern/kern_proc.c	Sat May 16 23:33:07 2009	(r192233)
@@ -200,6 +200,8 @@ proc_dtor(void *mem, int size, void *arg
 		    ("bad number of threads in exiting process"));
 		KASSERT(STAILQ_EMPTY(&p->p_ktr), ("proc_dtor: non-empty p_ktr"));
 #endif
+		/* Free all OSD associated to this thread. */
+		osd_thread_exit(td);
 
 		/* Dispose of an alternate kstack, if it exists.
 		 * XXX What if there are more than one thread in the proc?

Modified: user/kmacy/ZFS_MFC/sys/kern/kern_thread.c
==============================================================================
--- user/kmacy/ZFS_MFC/sys/kern/kern_thread.c	Sat May 16 22:54:16 2009	(r192232)
+++ user/kmacy/ZFS_MFC/sys/kern/kern_thread.c	Sat May 16 23:33:07 2009	(r192233)
@@ -133,6 +133,9 @@ thread_ctor(void *mem, int size, void *a
 #ifdef AUDIT
 	audit_thread_alloc(td);
 #endif
+	/* Free all OSD associated to this thread. */
+	osd_thread_exit(td);
+
 	umtx_thread_alloc(td);
 	return (0);
 }


More information about the svn-src-user mailing list