From 11ed5c59993b2815522892c116e6dec785acde81 Mon Sep 17 00:00:00 2001 From: mohrcore Date: Mon, 24 Jan 2022 21:57:12 +0100 Subject: [PATCH] Fixed recursive lock in vcache --- sys/kern/vfs_vcache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/kern/vfs_vcache.c b/sys/kern/vfs_vcache.c index adfdc21f9e..1358c6e91e 100644 --- a/sys/kern/vfs_vcache.c +++ b/sys/kern/vfs_vcache.c @@ -53,7 +53,7 @@ vnode_t *vcache_hashget(mount_t *mp, ino_t ino) { vnode_t *vn = NULL; TAILQ_FOREACH (vn, &vcache_buckets[bucket], v_cached) { - if (vn->v_mount == mp && vn->v_ino == ino) { + if ((vn->v_mount == mp ) && (vn->v_ino == ino)) { TAILQ_REMOVE(&vcache_free, vn, v_free); TAILQ_REMOVE(&vcache_buckets[bucket], vn, v_cached); vnode_hold(vn); @@ -70,8 +70,6 @@ static int vfs_vcache_remove_from_bucket(vnode_t *vn) { vcache_t bucket = vcache_hash(vn->v_mount, vn->v_ino); vnode_t *bucket_node = NULL; - SCOPED_MTX_LOCK(&vcache_giant_lock); - TAILQ_FOREACH (bucket_node, &vcache_buckets[bucket], v_cached) { if (bucket_node == vn) { TAILQ_REMOVE(&vcache_buckets[bucket], vn, v_cached);