diff options
author | ups <ups@FreeBSD.org> | 2005-09-22 15:34:15 +0000 |
---|---|---|
committer | ups <ups@FreeBSD.org> | 2005-09-22 15:34:15 +0000 |
commit | 9d3a13d44754ee0bf6f6068fe2ada4e124731a7d (patch) | |
tree | 3ccf8d5db65afbeb6f022754ec77e2465d2c1953 | |
parent | 923330aadca00e37e4ace02811887d2796c7518a (diff) | |
download | FreeBSD-src-9d3a13d44754ee0bf6f6068fe2ada4e124731a7d.zip FreeBSD-src-9d3a13d44754ee0bf6f6068fe2ada4e124731a7d.tar.gz |
Don't pretend to be thread0 when calling sync().
It confuses the lock manager since in some places thread0 is
then used for vnode locking while curthread is used for vnode unlocking.
Found by: Yahoo!
Reviewed by: ps@,jhb@
MFC after: 3 days
-rw-r--r-- | sys/kern/kern_shutdown.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 9b70f18..9ba486f 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -289,7 +289,7 @@ boot(int howto) waittime = 0; - sync(&thread0, NULL); + sync(curthread, NULL); /* * With soft updates, some buffers that are @@ -314,7 +314,7 @@ boot(int howto) if (nbusy < pbusy) iter = 0; pbusy = nbusy; - sync(&thread0, NULL); + sync(curthread, NULL); #ifdef PREEMPTION /* |