summaryrefslogtreecommitdiff
path: root/libnetfs/release-peropen.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-03-02 21:11:40 +0000
committerMiles Bader <miles@gnu.org>1997-03-02 21:11:40 +0000
commit6c3f43d2bd1ffc723dcfefdd4669a71293d779e7 (patch)
treefc86a4915d84c2faf388586b9d9db795d57303f6 /libnetfs/release-peropen.c
parent0fbec5e8bf04c081ccb3c2131d2e239d1e3a4866 (diff)
(netfs_release_peropen):
Finalize new state.
Diffstat (limited to 'libnetfs/release-peropen.c')
-rw-r--r--libnetfs/release-peropen.c15
1 files 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);
}
}