diff options
author | kan <kan@FreeBSD.org> | 2003-11-02 04:52:53 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-11-02 04:52:53 +0000 |
commit | 618baf4714471cc3fb5fab3d4269d35a9a8ade41 (patch) | |
tree | 1ebb69eabd6780710c1f611211ad591a9dcf2865 /sys/fs/msdosfs | |
parent | e8941020faeaacc1170c5ab92faa75b1cc622131 (diff) | |
download | FreeBSD-src-618baf4714471cc3fb5fab3d4269d35a9a8ade41.zip FreeBSD-src-618baf4714471cc3fb5fab3d4269d35a9a8ade41.tar.gz |
Take care not to call vput if thread used in corresponding vget
wasn't curthread, i.e. when we receive a thread pointer to use
as a function argument. Use VOP_UNLOCK/vrele in these cases.
The only case there td != curthread known at the moment is
boot() calling sync with thread0 pointer.
This fixes the panic on shutdown people have reported.
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 21bd2bc..fc0e354 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -814,7 +814,8 @@ loop: error = VOP_FSYNC(vp, cred, waitfor, td); if (error) allerror = error; - vput(vp); + VOP_UNLOCK(vp, 0, td); + vrele(vp); mtx_lock(&mntvnode_mtx); } mtx_unlock(&mntvnode_mtx); |