summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdiskfs/io-restrict-auth.c2
-rw-r--r--libnetfs/io-restrict-auth.c3
2 files changed, 0 insertions, 5 deletions
diff --git a/libdiskfs/io-restrict-auth.c b/libdiskfs/io-restrict-auth.c
index 80c0b208..1c2c999d 100644
--- a/libdiskfs/io-restrict-auth.c
+++ b/libdiskfs/io-restrict-auth.c
@@ -40,7 +40,6 @@ diskfs_S_io_restrict_auth (struct protid *cred,
if (err)
return err;
- pthread_mutex_lock (&cred->po->np->lock);
refcount_ref (&cred->po->refcnt);
err = diskfs_create_protid (cred->po, user, &newpi);
if (! err)
@@ -51,7 +50,6 @@ diskfs_S_io_restrict_auth (struct protid *cred,
}
else
refcount_deref (&cred->po->refcnt);
- pthread_mutex_unlock (&cred->po->np->lock);
iohelp_free_iouser (user);
return err;
diff --git a/libnetfs/io-restrict-auth.c b/libnetfs/io-restrict-auth.c
index 79b7d095..89df6716 100644
--- a/libnetfs/io-restrict-auth.c
+++ b/libnetfs/io-restrict-auth.c
@@ -42,19 +42,16 @@ netfs_S_io_restrict_auth (struct protid *user,
if (err)
return err;
- pthread_mutex_lock (&user->po->np->lock);
refcount_ref (&user->po->refcnt);
newpi = netfs_make_protid (user->po, new_user);
if (newpi)
{
*newport = ports_get_right (newpi);
- pthread_mutex_unlock (&user->po->np->lock);
*newporttype = MACH_MSG_TYPE_MAKE_SEND;
}
else
{
refcount_deref (&user->po->refcnt);
- pthread_mutex_unlock (&user->po->np->lock);
iohelp_free_iouser (new_user);
err = ENOMEM;
}