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.
This commit is contained in:
parent
e221ac46f1
commit
5dec3ab667
@ -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 <sys/cdefs.h>
|
||||
__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 <sys/param.h>
|
||||
#include <sys/pool.h>
|
||||
@ -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);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user