summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nfs/ChangeLog5
-rw-r--r--nfs/pager.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/nfs/ChangeLog b/nfs/ChangeLog
index f8385c26..afdb9495 100644
--- a/nfs/ChangeLog
+++ b/nfs/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 20 14:31:03 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
+
+ * pager.c (netfs_get_filemap): If pager_create fails, return
+ error to caller.
+
Wed Aug 6 15:23:03 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* ops.c (netfs_attempt_unlink): Purge cache-held references
diff --git a/nfs/pager.c b/nfs/pager.c
index b511429b..be5541cf 100644
--- a/nfs/pager.c
+++ b/nfs/pager.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -283,6 +283,13 @@ netfs_get_filemap (struct node *np, vm_prot_t prot)
netfs_nref (np);
upi->max_prot = prot;
upi->p = pager_create (upi, pager_bucket, 1, MEMORY_OBJECT_COPY_NONE);
+ if (upi->p == 0)
+ {
+ netfs_nrele (np);
+ free (upi);
+ spin_unlock (&node2pagelock);
+ return MACH_PORT_NULL;
+ }
np->nn->fileinfo = upi;
right = pager_get_port (np->nn->fileinfo->p);
ports_port_deref (np->nn->fileinfo->p);