The branch main has been updated by mjg:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=43999a5cba3cfbf0a0f6244c76a3cd548b6925e8

commit 43999a5cba3cfbf0a0f6244c76a3cd548b6925e8
Author:     Mateusz Guzik <[email protected]>
AuthorDate: 2021-05-19 14:20:23 +0000
Commit:     Mateusz Guzik <[email protected]>
CommitDate: 2021-05-19 17:58:42 +0000

    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 @@ 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;
                                /*
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "[email protected]"

Reply via email to