bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/8] hostmux: Use refcounts_t to track node references.


From: Flavio Cruz
Subject: [PATCH 4/8] hostmux: Use refcounts_t to track node references.
Date: Sun, 6 Mar 2016 17:06:07 -0500
User-agent: Mutt/1.5.24 (2015-08-30)

* hostmux/mux.c: Use netfs_nref to increase hard references of the node.
---
 hostmux/mux.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/hostmux/mux.c b/hostmux/mux.c
index 81d3961..ddca89d 100644
--- a/hostmux/mux.c
+++ b/hostmux/mux.c
@@ -240,10 +240,8 @@ lookup_cached (struct hostmux *mux, const char *host, int 
purge,
 
       if (strcasecmp (host, nm->name) == 0)
        {
-         pthread_spin_lock (&netfs_node_refcnt_lock);
-         if (nm->node)
-           nm->node->references++;
-         pthread_spin_unlock (&netfs_node_refcnt_lock);
+          if (nm->node)
+            netfs_nref (nm->node);
 
          if (nm->node)
            {
-- 
2.6.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]