Ensure that cached struct thread does not keep spurious td_su

reference on an UFS mount point.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
kib 2017-06-03 14:12:17 +00:00
parent f26dbec8ca
commit a903ffb782

View File

@ -226,6 +226,8 @@ proc_dtor(void *mem, int size, void *arg)
#endif
/* Free all OSD associated to this thread. */
osd_thread_exit(td);
td_softdep_cleanup(td);
MPASS(td->td_su == NULL);
/* Make sure all thread destructors are executed */
EVENTHANDLER_INVOKE(thread_dtor, td);