summaryrefslogtreecommitdiff
path: root/libnetfs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-08-28 19:18:48 +0000
committerMiles Bader <miles@gnu.org>1997-08-28 19:18:48 +0000
commitd6ebd82df69da740ba647761cb5ba70cb457bef1 (patch)
treed9ff20c91c5bc10e45aeb22422c34313824ec41b /libnetfs
parentc53911dbbafba5e79ce4b2bd7f2d544a3b79eb29 (diff)
(netfs_S_dir_lookup):
Don't lock DNP or assume it's locked when it shouldn't be.
Diffstat (limited to 'libnetfs')
-rw-r--r--libnetfs/dir-lookup.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/libnetfs/dir-lookup.c b/libnetfs/dir-lookup.c
index f6b78afd..6b3c58c1 100644
--- a/libnetfs/dir-lookup.c
+++ b/libnetfs/dir-lookup.c
@@ -247,8 +247,6 @@ netfs_S_dir_lookup (struct protid *diruser,
mach_port_insert_right (mach_task_self (), dirport, dirport,
MACH_MSG_TYPE_MAKE_SEND);
ports_port_deref (newpi);
- if (np != dnp)
- mutex_unlock (&dnp->lock);
error = fshelp_fetch_root (&np->transbox, diruser->po,
dirport,
@@ -274,20 +272,8 @@ netfs_S_dir_lookup (struct protid *diruser,
}
/* ENOENT means there was a hiccup, and the translator vanished
- while NP was unlocked inside fshelp_fetch_root.
- Reacquire the locks and continue as normal. */
+ while NP was unlocked inside fshelp_fetch_root; continue as normal. */
error = 0;
- if (np != dnp)
- {
- if (!strcmp (filename, ".."))
- mutex_lock (&dnp->lock);
- else
- {
- mutex_unlock (&np->lock);
- mutex_lock (&dnp->lock);
- mutex_lock (&np->lock);
- }
- }
}
if (S_ISLNK (np->nn_stat.st_mode)
@@ -340,7 +326,6 @@ netfs_S_dir_lookup (struct protid *diruser,
create = 0;
}
netfs_nput (np);
- mutex_lock (&dnp->lock);
np = 0;
}
else