getblk(): do not require devvp vnodes to be locked

(cherry picked from commit a7b4a54d2c)
This commit is contained in:
Konstantin Belousov 2021-11-01 09:14:01 +02:00
parent 77ddf3808b
commit 4c04226222

View File

@ -3902,7 +3902,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);