summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-07-03 15:58:44 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-07-03 15:58:44 +0000
commitdae5a1ff67543fc2322dbcfc77b22474ca0fccb4 (patch)
treea8bb386a1d30f5cd30fe5148332cc6d348d95f6b
parentc50ecbe02150d6d5f8feb7df4ba078a344c8ee49 (diff)
(netfs_S_io_identity): Use fshelp_get_identity instead of creating
port ourselves.
-rw-r--r--libnetfs/io-identity.c18
1 files changed, 6 insertions, 12 deletions
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;