From dae5a1ff67543fc2322dbcfc77b22474ca0fccb4 Mon Sep 17 00:00:00 2001
From: "Michael I. Bushnell" <mib@gnu.org>
Date: Wed, 3 Jul 1996 15:58:44 +0000
Subject: (netfs_S_io_identity): Use fshelp_get_identity instead of creating
 port ourselves.

---
 libnetfs/io-identity.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

(limited to 'libnetfs')

diff --git a/libnetfs/io-identity.c b/libnetfs/io-identity.c
index ffd941ed..cd0deec9 100644
--- a/libnetfs/io-identity.c
+++ b/libnetfs/io-identity.c
@@ -38,17 +38,6 @@ netfs_S_io_identity (struct protid *cred,
   np = cred->po->np;
   mutex_lock (&np->lock);
   
-  if (np->identity == MACH_PORT_NULL)
-    {
-      err = mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE,
-				&np->identity);
-      if (err)
-	{
-	  mutex_unlock (&np->lock);
-	  return err;
-	}
-    }
-  
   err = netfs_validate_stat (np, cred->credential);
   if (err)
     {
@@ -56,7 +45,12 @@ netfs_S_io_identity (struct protid *cred,
       return err;
     }
 
-  *id = np->identity;
+  err = fshelp_get_identity (netfs_port_bucket, np->nn_stat.st_ino, &id);
+  if (err)
+    {
+      mutex_unlock (&np->lock);
+      return err;
+    }
   *idtype = MACH_MSG_TYPE_MAKE_SEND;
   *fsys = netfs_fsys_identity;
   *fsystype = MACH_MSG_TYPE_MAKE_SEND;
-- 
cgit v1.2.3