From 9cc6c9ec990fd9f2ffceeefd076c7236d7e3a1af Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Wed, 20 Aug 1997 19:05:37 +0000 Subject: Wed Aug 20 14:31:03 1997 Thomas Bushnell, n/BSG * pager.c (netfs_get_filemap): If pager_create fails, return error to caller. --- nfs/ChangeLog | 5 +++++ nfs/pager.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'nfs') 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 + + * pager.c (netfs_get_filemap): If pager_create fails, return + error to caller. + Wed Aug 6 15:23:03 1997 Thomas Bushnell, n/BSG * 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); -- cgit v1.2.3