diff options
author | Miles Bader <miles@gnu.org> | 1997-02-14 01:25:03 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1997-02-14 01:25:03 +0000 |
commit | c912176589cfb1fc0e4ae7f16dee5eb60de3a6dd (patch) | |
tree | 0d754455dd3fb52d724d7fcc2a9d093172689b64 /libdiskfs/peropen-rele.c | |
parent | b8793e8744443545be73e51f4a416a74dcc99b6d (diff) |
(diskfs_release_peropen):
Finalize new state.
Diffstat (limited to 'libdiskfs/peropen-rele.c')
-rw-r--r-- | libdiskfs/peropen-rele.c | 16 |
1 files changed, 12 insertions, 4 deletions
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); } - - |