From 43999a5cba3cfbf0a0f6244c76a3cd548b6925e8 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Wed, 19 May 2021 14:20:23 +0000 Subject: [PATCH] pseudofs: use vget_prep + vget_finish instead of vget + the interlock --- sys/fs/pseudofs/pseudofs_vncache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c index 8d6f56f6fe27..b0b10d525783 100644 --- a/sys/fs/pseudofs/pseudofs_vncache.c +++ b/sys/fs/pseudofs/pseudofs_vncache.c @@ -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 @@ pfs_vncache_alloc(struct mount *mp, struct vnode **vpp, 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; /*