summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-11-02 04:52:53 +0000
committerkan <kan@FreeBSD.org>2003-11-02 04:52:53 +0000
commit618baf4714471cc3fb5fab3d4269d35a9a8ade41 (patch)
tree1ebb69eabd6780710c1f611211ad591a9dcf2865 /sys/fs/msdosfs
parente8941020faeaacc1170c5ab92faa75b1cc622131 (diff)
downloadFreeBSD-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.c3
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);
OpenPOWER on IntegriCloud