summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
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/nfsclient
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/nfsclient')
-rw-r--r--sys/nfsclient/nfs_vfsops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 880d2b1..3df0fa3 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -958,7 +958,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