[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 02/02: Update upstream fix
From: |
Samuel Thibault |
Subject: |
[hurd] 02/02: Update upstream fix |
Date: |
Sat, 06 Jan 2018 01:07:00 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch master
in repository hurd.
commit 49611e6c42c2e5a5719c79d1714a2233e9842bf2
Author: Samuel Thibault <address@hidden>
Date: Sat Jan 6 01:06:41 2018 +0000
Update upstream fix
---
debian/patches/get-identity_weakref.diff | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/debian/patches/get-identity_weakref.diff
b/debian/patches/get-identity_weakref.diff
index 4752e72..9912583 100644
--- a/debian/patches/get-identity_weakref.diff
+++ b/debian/patches/get-identity_weakref.diff
@@ -34,3 +34,35 @@ index f88e0f82..96de55a8 100644
hurd_ihash_locp_remove (&idhash, i->id_hashloc);
ports_port_deref_weak (&i->pi);
}
+commit 6868c17b7def25beb69e7b685496e078340d8b12
+Author: Samuel Thibault <address@hidden>
+Date: Sat Jan 6 02:05:06 2018 +0100
+
+ libfshelp/get-identity.c: Simplify checking weak references
+
+ * libfshelp/get-identity.c (id_clean): Test whether i is still in the
+ hash table instead of counting weak references.
+
+diff --git a/libfshelp/get-identity.c b/libfshelp/get-identity.c
+index 96de55a8..ac1b4f0b 100644
+--- a/libfshelp/get-identity.c
++++ b/libfshelp/get-identity.c
+@@ -69,14 +69,13 @@ static void
+ id_clean (void *cookie)
+ {
+ struct idspec *i = cookie;
+- struct references result;
+ pthread_mutex_lock (&idlock);
+- refcounts_references (&i->pi.refcounts, &result);
+- if (result.hard == 0 && result.weak == 2)
++ if (refcounts_hard_references(&i->pi.refcounts) == 0
++ && i->id_hashloc != NULL)
+ {
+- /* Nobody got a send right in between and we have the last weak
reference
+- in addition to our caller's, so we can remove from the hash. */
++ /* Nobody got a send right in between, we can remove i from the hash.
*/
+ hurd_ihash_locp_remove (&idhash, i->id_hashloc);
++ i->id_hashloc = NULL;
+ ports_port_deref_weak (&i->pi);
+ }
+ pthread_mutex_unlock (&idlock);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git