summaryrefslogtreecommitdiff
path: root/libdiskfs/peropen-make.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-05-06 18:58:10 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-05-26 11:18:13 +0200
commitdc00a94df4a06764d822b29cbf35b532343821c8 (patch)
treee7564cd1b9db1e8019cf1d4a458922c0de245b04 /libdiskfs/peropen-make.c
parentb793108b09138edf0a963d9e3107eb400ee27011 (diff)
libdiskfs: lock-less reference counting for peropen objects
* libdiskfs/diskfs.h (struct peropen): Use refcount_t for field refcnt. * libdiskfs/peropen-make.c (diskfs_make_peropen): Initialize refcnt. * libdiskfs/peropen-rele.c (diskfs_release_peropen): Adjust accordingly. * libdiskfs/protid-make.c (diskfs_start_protid): Likewise. Also, the node must no longer be locked, adjust comment accordingly. (diskfs_create_protid): Likewise.
Diffstat (limited to 'libdiskfs/peropen-make.c')
-rw-r--r--libdiskfs/peropen-make.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdiskfs/peropen-make.c b/libdiskfs/peropen-make.c
index eba037ff..6d5ca014 100644
--- a/libdiskfs/peropen-make.c
+++ b/libdiskfs/peropen-make.c
@@ -31,7 +31,7 @@ diskfs_make_peropen (struct node *np, int flags, struct peropen *context,
po->filepointer = 0;
po->lock_status = LOCK_UN;
- po->refcnt = 0;
+ refcount_init (&po->refcnt, 0);
po->openstat = flags;
po->np = np;
po->path = NULL;