diff options
author | phk <phk@FreeBSD.org> | 2002-10-25 07:58:25 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-25 07:58:25 +0000 |
commit | 7320ebcf72f1e644f52ab27e6940a1d528ecd0f4 (patch) | |
tree | 6c45c0227949151b7538d3c8491baec974007b54 | |
parent | 6bbbd468fdb44ba4d180109d8aead7f59c469524 (diff) | |
download | FreeBSD-src-7320ebcf72f1e644f52ab27e6940a1d528ecd0f4.zip FreeBSD-src-7320ebcf72f1e644f52ab27e6940a1d528ecd0f4.tar.gz |
In vrele() we can actually have a VCHR with v_rdev == NULL if we
came from the bottom of addaliasu(). Don't panic.
-rw-r--r-- | sys/kern/vfs_subr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 8f35ddb..c847563 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1958,7 +1958,7 @@ static void v_incr_usecount(struct vnode *vp, int delta) { vp->v_usecount += delta; - if (vp->v_type == VCHR) { + if (vp->v_type == VCHR && vp->v_rdev != NULL) { mtx_lock(&spechash_mtx); vp->v_rdev->si_usecount += delta; mtx_unlock(&spechash_mtx); |