mirror of
https://github.com/opnsense/src.git
synced 2026-05-20 17:09:30 -04:00
pseudofs: use vget_prep + vget_finish instead of vget + the interlock
(cherry picked from commit 43999a5cba)
This commit is contained in:
parent
e9757b0c94
commit
af68d00a20
1 changed files with 3 additions and 2 deletions
|
|
@ -120,6 +120,7 @@ pfs_vncache_alloc(struct mount *mp, struct vnode **vpp,
|
|||
struct pfs_vncache_head *hash;
|
||||
struct pfs_vdata *pvd, *pvd2;
|
||||
struct vnode *vp;
|
||||
enum vgetstate vs;
|
||||
int error;
|
||||
|
||||
/*
|
||||
|
|
@ -134,9 +135,9 @@ retry:
|
|||
if (pvd->pvd_pn == pn && pvd->pvd_pid == pid &&
|
||||
pvd->pvd_vnode->v_mount == mp) {
|
||||
vp = pvd->pvd_vnode;
|
||||
VI_LOCK(vp);
|
||||
vs = vget_prep(vp);
|
||||
mtx_unlock(&pfs_vncache_mutex);
|
||||
if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK) == 0) {
|
||||
if (vget_finish(vp, LK_EXCLUSIVE, vs) == 0) {
|
||||
++pfs_vncache_hits;
|
||||
*vpp = vp;
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue