Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Sep 2021 01:09:06 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 6103f34e543d - stable/13 - vfs_hash_rehash(): require the vnode to be exclusively locked
Message-ID:  <202109030109.1831966v004880@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

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

commit 6103f34e543df0147bfa3e68a9666479954cdca9
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-08-18 11:14:42 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-09-03 01:08:36 +0000

    vfs_hash_rehash(): require the vnode to be exclusively locked
    
    (cherry picked from commit f19063ab029b067e1763780aebca4bd620453110)
---
 sys/kern/vfs_hash.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/kern/vfs_hash.c b/sys/kern/vfs_hash.c
index c5d67c8b2b33..2e446e69a314 100644
--- a/sys/kern/vfs_hash.c
+++ b/sys/kern/vfs_hash.c
@@ -196,6 +196,7 @@ vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td,
 void
 vfs_hash_rehash(struct vnode *vp, u_int hash)
 {
+	ASSERT_VOP_ELOCKED(vp, "rehash requires excl lock");
 
 	rw_wlock(&vfs_hash_lock);
 	LIST_REMOVE(vp, v_hashlist);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109030109.1831966v004880>