summaryrefslogtreecommitdiff
path: root/libdiskfs/dir-lookup.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-09-01 22:28:21 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-09-01 22:28:21 +0000
commitbe4514bbe30ecf504619d53c0dc471c909b6c11a (patch)
treea4949c28e9e58b5a407035fbc055f5230b82a67d /libdiskfs/dir-lookup.c
parentac26caff5e070834ee299f0c434bf277f03afd02 (diff)
Formerly dir-lookup.c.~3~
Diffstat (limited to 'libdiskfs/dir-lookup.c')
-rw-r--r--libdiskfs/dir-lookup.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index 73ccb0c7..97e6e2a2 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -175,21 +175,23 @@ diskfs_S_dir_lookup (struct protid *dircred,
dirfile = (ports_get_right
(diskfs_make_protid
- (diskfs_make_peropen (np, 0,
+ (diskfs_make_peropen (dnp, 0,
dircred->po->dotdotport),
0, 0, 0, 0)));
mach_port_insert_right (mach_task_self (), dirfile, dirfile,
MACH_MSG_TYPE_MAKE_SEND);
+ mach_port_mod_refs (mach_task_self (), dirfile,
+ MACH_PORT_RIGHT_SEND, 1);
if (control == MACH_PORT_NULL)
{
mutex_unlock (&dnp->lock);
- error = diskfs_start_translator (np, dirfile);
+ error = diskfs_start_translator (np, dirfile, dircred);
if (error)
{
+ mach_port_deallocate (mach_task_self (), dirfile);
diskfs_nrele (dnp);
dnp = 0;
- mach_port_deallocate (mach_task_self (), dirfile);
goto out;
}
control = np->translator.control;
@@ -216,6 +218,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
uids, nuids, gids, ngids,
lastcomp ? flags : flags & ~O_NOLINK,
retry, retryname, returned_port);
+ mach_port_deallocate (mach_task_self (), dirfile);
if (error == MACH_SEND_INVALID_DEST)
{
/* The server has died. Deallocate our right and