The branch main has been updated by des:

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

commit af0435e16bab8d6afb7760dcdcc5344efd10c844
Author:     Dag-Erling Smørgrav <[email protected]>
AuthorDate: 2023-02-10 17:19:45 +0000
Commit:     Dag-Erling Smørgrav <[email protected]>
CommitDate: 2023-02-10 17:19:45 +0000

    tarfs: Fix deadlock between descent and ascent in tarfs_lookup().
    
    Sponsored by:   Juniper Networks, Inc.
    Sponsored by:   Klara, Inc.
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D38486
---
 sys/fs/tarfs/tarfs_vnops.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/fs/tarfs/tarfs_vnops.c b/sys/fs/tarfs/tarfs_vnops.c
index 99ff39d41271..7a04f891350e 100644
--- a/sys/fs/tarfs/tarfs_vnops.c
+++ b/sys/fs/tarfs/tarfs_vnops.c
@@ -165,6 +165,7 @@ tarfs_getattr(struct vop_getattr_args *ap)
 static int
 tarfs_lookup(struct vop_cachedlookup_args *ap)
 {
+       struct tarfs_mount *tmp;
        struct tarfs_node *dirnode, *parent, *tnp;
        struct componentname *cnp;
        struct vnode *dvp, **vpp;
@@ -180,6 +181,7 @@ tarfs_lookup(struct vop_cachedlookup_args *ap)
        *vpp = NULLVP;
        dirnode = VP_TO_TARFS_NODE(dvp);
        parent = dirnode->parent;
+       tmp = dirnode->tmp;
        tnp = NULL;
 
        TARFS_DPF(LOOKUP, "%s(%p=%s, %.*s)\n", __func__,
@@ -228,7 +230,7 @@ tarfs_lookup(struct vop_cachedlookup_args *ap)
                    (tnp->type != VDIR && tnp->type != VLNK))
                        return (ENOTDIR);
 
-               error = vn_vget_ino(dvp, tnp->ino, cnp->cn_lkflags, vpp);
+               error = VFS_VGET(tmp->vfs, tnp->ino, cnp->cn_lkflags, vpp);
                if (error != 0)
                        return (error);
        }

Reply via email to