Index: libdiskfs/dir-lookup.c =================================================================== RCS file: /cvsroot/hurd/hurd/libdiskfs/dir-lookup.c,v retrieving revision 1.53 diff -u -p -r1.53 dir-lookup.c --- libdiskfs/dir-lookup.c 13 May 2002 22:04:48 -0000 1.53 +++ libdiskfs/dir-lookup.c 5 Jun 2008 23:11:18 -0000 @@ -463,7 +463,10 @@ diskfs_S_dir_lookup (struct protid *dirc { error = diskfs_create_protid (newpo, dircred->user, &newpi); if (error) - diskfs_release_peropen (newpo); + { + mutex_unlock(&np->lock); + diskfs_release_peropen (newpo); + } } if (! error) @@ -475,7 +478,10 @@ diskfs_S_dir_lookup (struct protid *dirc error = fshelp_acquire_lock (&np->userlock, &newpi->po->lock_status, &np->lock, LOCK_SH); if (error) - ports_port_deref (newpi); /* Get rid of NEWPI. */ + { + mutex_unlock(&np->lock); + ports_port_deref (newpi); /* Get rid of NEWPI. */ + } } if (! error)