The branch main has been updated by kib:

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

commit a7b4a54d2c02822d36bb51b1e4450e1bc14ba73a
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2021-11-01 07:14:01 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2021-11-12 23:00:24 +0000

    getblk(): do not require devvp vnodes to be locked
    
    Reported and tested by: pho
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D32761
---
 sys/kern/vfs_bio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 034bbccc437d..2b89490ce618 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -3911,7 +3911,8 @@ getblkx(struct vnode *vp, daddr_t blkno, daddr_t dblkno, 
int size, int slpflag,
        CTR3(KTR_BUF, "getblk(%p, %ld, %d)", vp, (long)blkno, size);
        KASSERT((flags & (GB_UNMAPPED | GB_KVAALLOC)) != GB_KVAALLOC,
            ("GB_KVAALLOC only makes sense with GB_UNMAPPED"));
-       ASSERT_VOP_LOCKED(vp, "getblk");
+       if (vp->v_type != VCHR)
+               ASSERT_VOP_LOCKED(vp, "getblk");
        if (size > maxbcachebuf)
                panic("getblk: size(%d) > maxbcachebuf(%d)\n", size,
                    maxbcachebuf);

Reply via email to