From 6c3f43d2bd1ffc723dcfefdd4669a71293d779e7 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sun, 2 Mar 1997 21:11:40 +0000 Subject: (netfs_release_peropen): Finalize new state. --- libnetfs/release-peropen.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/libnetfs/release-peropen.c b/libnetfs/release-peropen.c index 4fc0b45e..9a52184b 100644 --- a/libnetfs/release-peropen.c +++ b/libnetfs/release-peropen.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -28,8 +28,19 @@ netfs_release_peropen (struct peropen *po) mutex_unlock (&po->np->lock); else { - mach_port_deallocate (mach_task_self (), po->dotdotport); + if (po->root_parent) + mach_port_deallocate (mach_task_self (), po->root_parent); + + if (po->shadow_root && po->shadow_root != po->np) + { + mutex_lock (&po->shadow_root->lock); + netfs_nput (po->shadow_root); + } + if (po->shadow_root_parent) + mach_port_deallocate (mach_task_self (), po->shadow_root_parent); + netfs_nput (po->np); + free (po); } } -- cgit v1.2.3