From c912176589cfb1fc0e4ae7f16dee5eb60de3a6dd Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 14 Feb 1997 01:25:03 +0000 Subject: (diskfs_release_peropen): Finalize new state. --- libdiskfs/peropen-rele.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'libdiskfs/peropen-rele.c') diff --git a/libdiskfs/peropen-rele.c b/libdiskfs/peropen-rele.c index 032f820e..4030c3e0 100644 --- a/libdiskfs/peropen-rele.c +++ b/libdiskfs/peropen-rele.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994, 1996 Free Software Foundation + Copyright (C) 1994, 1996, 1997 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -30,7 +30,17 @@ diskfs_release_peropen (struct peropen *po) return; } - 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) + { + mutex_lock (&po->shadow_root->lock); + diskfs_nput (po->shadow_root); + } + if (po->shadow_root_parent) + mach_port_deallocate (mach_task_self (), po->shadow_root_parent); + if (po->lock_status != LOCK_UN) fshelp_acquire_lock (&po->np->userlock, &po->lock_status, &po->np->lock, LOCK_UN); @@ -39,5 +49,3 @@ diskfs_release_peropen (struct peropen *po) free (po); } - - -- cgit v1.2.3