From d6ebd82df69da740ba647761cb5ba70cb457bef1 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 28 Aug 1997 19:18:48 +0000 Subject: (netfs_S_dir_lookup): Don't lock DNP or assume it's locked when it shouldn't be. --- libnetfs/dir-lookup.c | 17 +---------------- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.3