Since it is not possible for curthread to be NULL in this context,

drop the check+initialization for a straight initialization. Also
assert that curthread will never be NULL just to be sure.

Discussed with:	rwatson, peter
MFC after:	1 week
This commit is contained in:
csjp 2005-05-02 02:07:55 +00:00
parent 0b23ec58c5
commit 431f1afe8c

View File

@ -2657,10 +2657,8 @@ vfs_unmountall()
struct thread *td;
int error;
if (curthread != NULL)
td = curthread;
else
td = FIRST_THREAD_IN_PROC(initproc); /* XXX XXX proc0? */
KASSERT(curthread != NULL, ("vfs_unmountall: NULL curthread"));
td = curthread;
/*
* Since this only runs when rebooting, it is not interlocked.
*/