summaryrefslogtreecommitdiff
path: root/libnetfs/nref.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnetfs/nref.c')
-rw-r--r--libnetfs/nref.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libnetfs/nref.c b/libnetfs/nref.c
index 86b49927..a40cf4db 100644
--- a/libnetfs/nref.c
+++ b/libnetfs/nref.c
@@ -23,7 +23,11 @@
void
netfs_nref (struct node *np)
{
- pthread_spin_lock (&netfs_node_refcnt_lock);
- np->references++;
- pthread_spin_unlock (&netfs_node_refcnt_lock);
+ refcounts_ref (&np->refcounts, NULL);
+}
+
+void
+netfs_nref_light (struct node *np)
+{
+ refcounts_ref_weak (&np->refcounts, NULL);
}