summaryrefslogtreecommitdiff
path: root/ufs/pager.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1997-08-20 19:06:42 +0000
committerThomas Bushnell <thomas@gnu.org>1997-08-20 19:06:42 +0000
commit7b01458f66d04a90e8497bd60f1baa7eb79b9d6a (patch)
treeb81d77f74bfb35d39e7b3a356ff16067f22cb63a /ufs/pager.c
parent56c05885be4c655fc18c119dbb87527bf5b9af86 (diff)
Wed Aug 20 14:34:24 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* dir.c (diskfs_lookup_hard): Cope with error return from diskfs_get_filemap. * sizes.c (diskfs_grow): Likewise. * dir.c (diskfs_dirempty): Cope (poorly) with error return from diskfs_get_filemap. * sizes.c (diskfs_truncate): Likewise. (block_extended): Likewise. * pager.c (diskfs_get_filemap): If pager_create fails, return error to caller.
Diffstat (limited to 'ufs/pager.c')
-rw-r--r--ufs/pager.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ufs/pager.c b/ufs/pager.c
index afb34839..61695db6 100644
--- a/ufs/pager.c
+++ b/ufs/pager.c
@@ -569,6 +569,13 @@ diskfs_get_filemap (struct node *np, vm_prot_t prot)
diskfs_nref_light (np);
upi->p = pager_create (upi, pager_bucket,
MAY_CACHE, MEMORY_OBJECT_COPY_DELAY);
+ if (upi->p == 0)
+ {
+ diskfs_nrele_light (np);
+ free (upi);
+ spin_unlock (&node2pagelock);
+ return MACH_PORT_NULL;
+ }
np->dn->fileinfo = upi;
right = pager_get_port (np->dn->fileinfo->p);
ports_port_deref (np->dn->fileinfo->p);