summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-12-04 22:07:18 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-12-04 22:07:18 +0000
commit95a85db1d3f3366c0c6d589b6cb9bcf64eef0d72 (patch)
tree30f32133b0c7c31c6b8b1374b551abbb07db98c1
parentc848cecdb5cd147cba9040232a72b482d5896bb6 (diff)
(diskfs_S_dir_unlink): Don't call fsys_goaway until we've released our
lock.
-rw-r--r--libdiskfs/dir-unlink.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libdiskfs/dir-unlink.c b/libdiskfs/dir-unlink.c
index 071e927e..fcfb6065 100644
--- a/libdiskfs/dir-unlink.c
+++ b/libdiskfs/dir-unlink.c
@@ -78,14 +78,7 @@ diskfs_S_dir_unlink (struct protid *dircred,
diskfs_node_update (np, 1);
if (np->dn_stat.st_nlink == 0)
- {
- error = fshelp_fetch_control (&np->transbox, &control);
- if (!error)
- {
- fsys_goaway (control, FSYS_GOAWAY_UNLINK);
- mach_port_deallocate (mach_task_self (), control);
- }
- }
+ fshelp_fetch_control (&np->transbox, &control);
/* This check is necessary because we might get here on an error while
checking the mode on something which happens to be `.'. */
@@ -94,5 +87,12 @@ diskfs_S_dir_unlink (struct protid *dircred,
else
diskfs_nput (np);
mutex_unlock (&dnp->lock);
+
+ if (control)
+ {
+ fsys_goaway (control, FSYS_GOAWAY_UNLINK);
+ mach_port_deallocate (mach_task_self (), control);
+ }
+
return error;
}