/[hurd]/hurd/trans/fakeroot.c
ViewVC logotype

Diff of /hurd/trans/fakeroot.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by roland, Sun May 5 19:19:51 2002 UTC revision 1.4 by roland, Sun May 5 19:31:46 2002 UTC
# Line 364  netfs_attempt_lookup (struct iouser *use Line 364  netfs_attempt_lookup (struct iouser *use
364        else        else
365          {          {
366            mach_port_deallocate (mach_task_self (), fsidport);            mach_port_deallocate (mach_task_self (), fsidport);
367            mutex_lock (&idport_ihash_lock);            if (fsidport == netfs_fsys_identity)
           *np = ihash_find (&idport_ihash, idport);  
           if (*np != 0)  
368              {              {
369                /* We already know about this node.  */                /* Talking to ourselves!  We just looked up one of our own nodes.
370                     Find the node and return it.  */
371                  struct protid *cred = ports_lookup_port (netfs_port_bucket, file,
372                                                           netfs_protid_class);
373                mach_port_deallocate (mach_task_self (), idport);                mach_port_deallocate (mach_task_self (), idport);
374                mach_port_deallocate (mach_task_self (), file);                mach_port_deallocate (mach_task_self (), file);
375                  if (cred == 0)
376                    return EGRATUITOUS;
377                  *np = cred->po->np;
378                netfs_nref (*np);                netfs_nref (*np);
379                mutex_unlock (&idport_ihash_lock);                ports_port_deref (cred);
380              }              }
381            else            else
382              {              {
383                mutex_unlock (&idport_ihash_lock);                mutex_lock (&idport_ihash_lock);
384                err = new_node (file, idport, flags, np);                *np = ihash_find (&idport_ihash, idport);
385                  if (*np != 0)
386                    {
387                      /* We already know about this node.  */
388                      mach_port_deallocate (mach_task_self (), idport);
389                      mach_port_deallocate (mach_task_self (), file);
390                      netfs_nref (*np);
391                      mutex_unlock (&idport_ihash_lock);
392                    }
393                  else
394                    {
395                      mutex_unlock (&idport_ihash_lock);
396                      err = new_node (file, idport, flags, np);
397                    }
398              }              }
399          }          }
400      }      }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26