diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-06-21 09:50:53 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-06-21 09:50:53 +0000 |
commit | 820ea82d234beda35e76a41e6256e120cc1d0c7b (patch) | |
tree | 01d474c2bb6a62266e4ca6e2d429c1353ffbfc8a /sys | |
parent | db9d1e1c3fa9e2ad1bcc5f77c3e13ae23b4509a2 (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.c | 8 |
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; |