summaryrefslogtreecommitdiff
path: root/nfs/pager.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1997-08-20 19:05:37 +0000
committerThomas Bushnell <thomas@gnu.org>1997-08-20 19:05:37 +0000
commit9cc6c9ec990fd9f2ffceeefd076c7236d7e3a1af (patch)
tree0dc420296abe2a5aee310616db0bf31b5bb97aca /nfs/pager.c
parent0018ec776f6a79ab572cb3efe734143c3480ac26 (diff)
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.
Diffstat (limited to 'nfs/pager.c')
-rw-r--r--nfs/pager.c9
1 files changed, 8 insertions, 1 deletions
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);