git: 4c04226222e4 - stable/13 - getblk(): do not require devvp vnodes to be locked
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 19 Nov 2021 04:36:43 UTC
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4c04226222e499a47dd89988bcbd6df1362c6f4f commit 4c04226222e499a47dd89988bcbd6df1362c6f4f Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-11-01 07:14:01 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-11-19 04:25:28 +0000 getblk(): do not require devvp vnodes to be locked (cherry picked from commit a7b4a54d2c02822d36bb51b1e4450e1bc14ba73a) --- 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 6ce445cbf2ee..1e58339446a9 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -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);