summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-06-20 00:42:01 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-06-20 00:42:01 +0000
commit84580754e26c9ad6da4ef608ada78b26c4485419 (patch)
treecc3eaf78e44c2c8d2e64df9d5b28f803cabd4049 /libdiskfs
parentf26b8b17d0368ed9e76ff8d20942eab1a96391aa (diff)
(diskfs_S_dir_rmdir): Don't attempt anything for translated
directories here; just return EBUSY.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/dir-rmdir.c35
1 files changed, 3 insertions, 32 deletions
diff --git a/libdiskfs/dir-rmdir.c b/libdiskfs/dir-rmdir.c
index 5dc6a854..31e20712 100644
--- a/libdiskfs/dir-rmdir.c
+++ b/libdiskfs/dir-rmdir.c
@@ -36,8 +36,6 @@ diskfs_S_dir_rmdir (struct protid *dircred,
if (diskfs_readonly)
return EROFS;
- retry:
-
mutex_lock (&dnp->lock);
error = diskfs_lookup (dnp, name, REMOVE, &np, ds, dircred);
@@ -59,40 +57,13 @@ diskfs_S_dir_rmdir (struct protid *dircred,
return EINVAL;
}
- mutex_lock (&np->translator.lock);
- if (np->translator.control != MACH_PORT_NULL)
+ if (np->istranslated || fshelp_translated (&np->transbox))
{
- mach_port_t control;
-
- /* There is a running active translator here. Give it a push.
- If it squeaks, then return an error. If it consents, then
- clear the active translator spec (unless it's been changed
- in the interim) and repeat the lookup above. */
-
- control = np->translator.control;
- mach_port_mod_refs (mach_task_self (), control, MACH_PORT_RIGHT_SEND, 1);
-
- mutex_unlock (&np->translator.lock);
diskfs_drop_dirstat (dnp, ds);
- mutex_unlock (&dnp->lock);
- mutex_unlock (&np->lock);
-
- error = fsys_goaway (control, FSYS_GOAWAY_UNLINK);
- if (error)
- return error;
-
- mutex_lock (&np->lock);
- mutex_lock (&np->translator.lock);
- if (np->translator.control == control)
- fshelp_translator_drop (&np->translator);
- mutex_unlock (&np->translator.lock);
diskfs_nput (np);
-
- mach_port_deallocate (mach_task_self (), control);
-
- goto retry;
+ mutex_unlock (&dnp->lock);
+ return EBUSY;
}
- mutex_unlock (&np->translator.lock);
/* Verify the directory is empty (and valid). (Rmdir ".." won't be
valid since ".." will contain a reference to the current directory and