- Since we don't hold a usecount in pfs_exit we have to get a holdcnt
prior to calling vgone() to prevent any races. Sponsored by: Isilon Systems, Inc. Approved by: re (vfs blanket)
This commit is contained in:
parent
c687e6de5b
commit
8b3676f1a1
@ -250,10 +250,12 @@ pfs_exit(void *arg, struct proc *p)
|
||||
while (pvd != NULL) {
|
||||
if (pvd->pvd_pid == p->p_pid) {
|
||||
vnp = pvd->pvd_vnode;
|
||||
vhold(vnp);
|
||||
mtx_unlock(&pfs_vncache_mutex);
|
||||
VOP_LOCK(vnp, LK_EXCLUSIVE, curthread);
|
||||
vgone(vnp);
|
||||
VOP_UNLOCK(vnp, 0, curthread);
|
||||
vdrop(vnp);
|
||||
mtx_lock(&pfs_vncache_mutex);
|
||||
pvd = pfs_vncache;
|
||||
} else {
|
||||
@ -282,10 +284,12 @@ pfs_disable(struct pfs_node *pn)
|
||||
while (pvd != NULL) {
|
||||
if (pvd->pvd_pn == pn) {
|
||||
vnp = pvd->pvd_vnode;
|
||||
vhold(vnp);
|
||||
mtx_unlock(&pfs_vncache_mutex);
|
||||
VOP_LOCK(vnp, LK_EXCLUSIVE, curthread);
|
||||
vgone(vnp);
|
||||
VOP_UNLOCK(vnp, 0, curthread);
|
||||
vdrop(vnp);
|
||||
mtx_lock(&pfs_vncache_mutex);
|
||||
pvd = pfs_vncache;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user