summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-04-25 00:54:08 +0200
committerJustus Winter <justus@gnupg.org>2016-05-19 22:28:33 +0200
commit04cfa521cd6f38d7cd735ead5b7978390664042e (patch)
treee3497f99f998418f1b73f5f9207f96307c5b1e70 /libdiskfs
parent55f23b9e82d6086bc4f21411e25aaf9746928d79 (diff)
Avoid superfluous locking of node
* libdiskfs/io-restrict-auth.c (diskfs_S_io_restrict_auth): Do not lock the associated node. No operation here needs synchronization. * libnetfs/io-restrict-auth.c (netfs_S_io_restrict_auth): Likewise.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/io-restrict-auth.c2
1 files changed, 0 insertions, 2 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;