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:
parent
0b23ec58c5
commit
431f1afe8c
@ -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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user