git: 2c2ef670a79b - main - pseudofs: use the vget_prep/vget_finish idiom
Date: Mon, 19 Sep 2022 20:09:02 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2c2ef670a79b7f8fa84796a04885a3f76c914762 commit 2c2ef670a79b7f8fa84796a04885a3f76c914762 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2022-09-19 20:07:10 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2022-09-19 20:08:40 +0000 pseudofs: use the vget_prep/vget_finish idiom --- sys/fs/pseudofs/pseudofs_vncache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c index 15892b510973..2b7ffae9921d 100644 --- a/sys/fs/pseudofs/pseudofs_vncache.c +++ b/sys/fs/pseudofs/pseudofs_vncache.c @@ -218,9 +218,9 @@ retry2: if (pvd2->pvd_pn == pn && pvd2->pvd_pid == pid && pvd2->pvd_vnode->v_mount == mp) { vp = pvd2->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; vgone(*vpp); vput(*vpp);