From b086d4c8b1b3d8f4c0f74c478c4b2fd8c1aa55ee Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 2 Jan 2017 21:43:13 +0100 Subject: Really update accessing refcount --- netfs.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/netfs.c b/netfs.c index 72fe5af7f..6ed7e3f39 100644 --- a/netfs.c +++ b/netfs.c @@ -79,7 +79,9 @@ netfs_attempt_lookup (struct iouser *user, struct node *dir, if (*np != dir) pthread_mutex_lock (&(*np)->lock); - debug (("Node %s: %i references", name, refcount_references(&(*np)->refcounts))); + debug (("Node %s: %i hard references", name, + refcounts_hard_references(&(*np)->refcounts), + refcounts_weak_references(&(*np)->refcounts))); netfs_nref (*np); } @@ -642,7 +644,9 @@ netfs_attempt_unlink (struct iouser *user, struct node *dir, { pthread_mutex_lock (&node->lock); - debug (("Node %s: %i references", name, refcount_references(&node->refcounts))); + debug (("Node %s: %i hard references", name, + refcounts_hard_references(&node->refcounts), + refcounts_weak_references(&node->refcounts))); err = fshelp_isowner (&node->nn_stat, user); if (!err) @@ -757,7 +761,9 @@ netfs_attempt_create_file (struct iouser *user, struct node *dir, /* Lock the new node and add a reference to it on success. */ if (!err && *np) { - debug (("Node %s: %i references", name, refcount_references(&(*np)->refcounts))); + debug (("Node %s: %i hard references", name, + refcounts_hard_references(&(*np)->refcounts), + refcounts_weak_references(&(*np)->refcounts))); pthread_mutex_lock (&(*np)->lock); netfs_nref (*np); } -- cgit v1.2.3