diff options
author | csjp <csjp@FreeBSD.org> | 2005-05-02 02:07:55 +0000 |
---|---|---|
committer | csjp <csjp@FreeBSD.org> | 2005-05-02 02:07:55 +0000 |
commit | 431f1afe8c934f27b93fcad229dec8c37ac7ac88 (patch) | |
tree | 9e22fb5068ce6a543f02a5803dcfde7e86dca9f3 /sys | |
parent | 0b23ec58c5133c924bd044670a2966842a3c0268 (diff) | |
download | FreeBSD-src-431f1afe8c934f27b93fcad229dec8c37ac7ac88.zip FreeBSD-src-431f1afe8c934f27b93fcad229dec8c37ac7ac88.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_subr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index eefc687..6a65680 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -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. */ |