summaryrefslogtreecommitdiff
path: root/libdiskfs/file-reparent.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs/file-reparent.c')
-rw-r--r--libdiskfs/file-reparent.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libdiskfs/file-reparent.c b/libdiskfs/file-reparent.c
index 2520c8a2..d04cd798 100644
--- a/libdiskfs/file-reparent.c
+++ b/libdiskfs/file-reparent.c
@@ -46,12 +46,10 @@ diskfs_S_file_reparent (struct protid *cred, mach_port_t parent,
{
/* Remove old shadow root state. */
if (new_cred->po->shadow_root && new_cred->po->shadow_root != node)
- {
- mutex_lock (&new_cred->po->shadow_root->lock);
- diskfs_nput (new_cred->po->shadow_root);
- }
+ diskfs_nrele (new_cred->po->shadow_root);
if (new_cred->po->shadow_root_parent)
- mach_port_deallocate (mach_task_self (), new_cred->po->shadow_root_parent);
+ mach_port_deallocate (mach_task_self (),
+ new_cred->po->shadow_root_parent);
/* And install PARENT instead. */
new_cred->po->shadow_root = node;