PR kern/38872 vnconfig panics with rw lock error

Pass IO_NODELOCKED where needed.
This commit is contained in:
ad 2008-09-24 07:57:30 +00:00
parent bd0daea8ff
commit 3704b6874f
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vnd.c,v 1.186 2008/07/19 13:58:08 kardel Exp $ */ /* $NetBSD: vnd.c,v 1.187 2008/09/24 07:57:30 ad Exp $ */
/*- /*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@ -130,7 +130,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.186 2008/07/19 13:58:08 kardel Exp $"); __KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.187 2008/09/24 07:57:30 ad Exp $");
#if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT)
#include "fs_nfs.h" #include "fs_nfs.h"
@ -1796,7 +1796,8 @@ compstrategy(struct buf *bp, off_t bn)
vn_lock(vnd->sc_vp, LK_EXCLUSIVE | LK_RETRY); vn_lock(vnd->sc_vp, LK_EXCLUSIVE | LK_RETRY);
error = vn_rdwr(UIO_READ, vnd->sc_vp, vnd->sc_comp_buff, error = vn_rdwr(UIO_READ, vnd->sc_vp, vnd->sc_comp_buff,
length, vnd->sc_comp_offsets[comp_block], length, vnd->sc_comp_offsets[comp_block],
UIO_SYSSPACE, IO_UNIT, vnd->sc_cred, NULL, NULL); UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, vnd->sc_cred,
NULL, NULL);
if (error) { if (error) {
bp->b_error = error; bp->b_error = error;
VOP_UNLOCK(vnd->sc_vp, 0); VOP_UNLOCK(vnd->sc_vp, 0);