summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2006-06-21 09:50:53 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2006-06-21 09:50:53 +0000
commit820ea82d234beda35e76a41e6256e120cc1d0c7b (patch)
tree01d474c2bb6a62266e4ca6e2d429c1353ffbfc8a /sys
parentdb9d1e1c3fa9e2ad1bcc5f77c3e13ae23b4509a2 (diff)
do not wait in pool_get() here as we can recover from no memory; tedu@ pedro@ ok; tested by many
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ufs/ufs_dirhash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/ufs/ufs/ufs_dirhash.c b/sys/ufs/ufs/ufs_dirhash.c
index 14070777f96..473fd29cbd9 100644
--- a/sys/ufs/ufs/ufs_dirhash.c
+++ b/sys/ufs/ufs/ufs_dirhash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_dirhash.c,v 1.13 2006/05/30 15:09:18 mickey Exp $ */
+/* $OpenBSD: ufs_dirhash.c,v 1.14 2006/06/21 09:50:52 mickey Exp $ */
/*
* Copyright (c) 2001, 2002 Ian Dowse. All rights reserved.
*
@@ -78,8 +78,8 @@ struct pool ufsdirhash_pool;
#define DIRHASHLIST_UNLOCK()
#define DIRHASH_LOCK(dh)
#define DIRHASH_UNLOCK(dh)
-#define DIRHASH_BLKALLOC_WAITOK() pool_get(&ufsdirhash_pool, PR_WAITOK)
-#define DIRHASH_BLKFREE(v) pool_put(&ufsdirhash_pool, v)
+#define DIRHASH_BLKALLOC() pool_get(&ufsdirhash_pool, PR_NOWAIT)
+#define DIRHASH_BLKFREE(v) pool_put(&ufsdirhash_pool, v)
#define mtx_assert(l, f) /* nothing */
#define DIRHASH_ASSERT(e, m) KASSERT((e))
@@ -182,7 +182,7 @@ ufsdirhash_build(struct inode *ip)
goto fail;
memset(dh->dh_hash, 0, narrays * sizeof(dh->dh_hash[0]));
for (i = 0; i < narrays; i++) {
- if ((dh->dh_hash[i] = DIRHASH_BLKALLOC_WAITOK()) == NULL)
+ if ((dh->dh_hash[i] = DIRHASH_BLKALLOC()) == NULL)
goto fail;
for (j = 0; j < DH_NBLKOFF; j++)
dh->dh_hash[i][j] = DIRHASH_EMPTY;