From 5dec3ab6673af234eaf1539a73273b4722f3bb13 Mon Sep 17 00:00:00 2001 From: pooka Date: Thu, 22 Nov 2007 21:08:10 +0000 Subject: [PATCH] Don't KASSERT that the pool allocator returns a page - it might be called with NOWAIT. XXX: this is just a quick fix to stop the diagnostic panic. I think ENOSPC should be treated elsewhere depending on how much memory tmpfs claims. --- sys/fs/tmpfs/tmpfs_pool.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_pool.c b/sys/fs/tmpfs/tmpfs_pool.c index ae3fe6c8f726..47445b30fade 100644 --- a/sys/fs/tmpfs/tmpfs_pool.c +++ b/sys/fs/tmpfs/tmpfs_pool.c @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_pool.c,v 1.10 2007/11/10 03:36:16 ad Exp $ */ +/* $NetBSD: tmpfs_pool.c,v 1.11 2007/11/22 21:08:10 pooka Exp $ */ /* * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tmpfs_pool.c,v 1.10 2007/11/10 03:36:16 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_pool.c,v 1.11 2007/11/22 21:08:10 pooka Exp $"); #include #include @@ -153,7 +153,6 @@ tmpfs_pool_destroy(struct tmpfs_pool *tpp) void * tmpfs_pool_page_alloc(struct pool *pp, int flags) { - void *page; struct tmpfs_pool *tpp; struct tmpfs_mount *tmp; @@ -164,10 +163,7 @@ tmpfs_pool_page_alloc(struct pool *pp, int flags) return NULL; tmp->tm_pages_used += 1; - page = pool_page_alloc_nointr(pp, flags); - KASSERT(page != NULL); - - return page; + return pool_page_alloc_nointr(pp, flags); } /* --------------------------------------------------------------------- */