From 15b3d123aeab1354223efdc218ddc8464b97e021 Mon Sep 17 00:00:00 2001 From: hannken Date: Mon, 3 Oct 2011 10:30:13 +0000 Subject: [PATCH] As getnewvnode() is prepared to wait for an allocation change vnalloc() to always use PR_WAITOK. No more 'WARNING: unable to allocate new vnode, retrying...' messages. --- sys/kern/vfs_vnode.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/kern/vfs_vnode.c b/sys/kern/vfs_vnode.c index 26ad8ed80a76..93de73c34388 100644 --- a/sys/kern/vfs_vnode.c +++ b/sys/kern/vfs_vnode.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_vnode.c,v 1.12 2011/10/02 13:00:06 hannken Exp $ */ +/* $NetBSD: vfs_vnode.c,v 1.13 2011/10/03 10:30:13 hannken Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -120,7 +120,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.12 2011/10/02 13:00:06 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.13 2011/10/03 10:30:13 hannken Exp $"); #include #include @@ -196,17 +196,15 @@ vfs_vnode_sysinit(void) /* * Allocate a new, uninitialized vnode. If 'mp' is non-NULL, this is a - * marker vnode and we are prepared to wait for the allocation. + * marker vnode. */ vnode_t * vnalloc(struct mount *mp) { vnode_t *vp; - vp = pool_cache_get(vnode_cache, (mp != NULL ? PR_WAITOK : PR_NOWAIT)); - if (vp == NULL) { - return NULL; - } + vp = pool_cache_get(vnode_cache, PR_WAITOK); + KASSERT(vp != NULL); memset(vp, 0, sizeof(*vp)); uvm_obj_init(&vp->v_uobj, &uvm_vnodeops, true, 0);