diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2016-02-07 01:33:00 -0500 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2016-02-07 15:42:23 +0100 |
commit | afea5285b0e40b68f97b47f0f0edc471b554fb34 (patch) | |
tree | d050d0e9738372db680d1d4036c63bd7d6de6cfb /libnetfs/make-peropen.c | |
parent | 35ae0168bbdae2eb7029262f49d394046a67860f (diff) | |
download | hurd-afea5285b0e40b68f97b47f0f0edc471b554fb34.tar.gz hurd-afea5285b0e40b68f97b47f0f0edc471b554fb34.tar.bz2 hurd-afea5285b0e40b68f97b47f0f0edc471b554fb34.zip |
Use refcount_t for peropen reference counting in libnetfs.
* libnetfs/netfs.h: Use refcount_t.
* libnetfs/make-peropen.c: Initialize to 1 with refcount_init just like in libdiskfs.
* libnetfs/make-protid.c: Don't increment the count here. Do it like libdiskfs.
* libnetfs/io-duplicate.c: Add refcount_ref since netfs_make_protid no longer increments the refcount.
* libnetfs/io-reauthenticate.c: Likewise.
* libnetfs/io-restrict-auth.c: Likewise.
* libnetfs/release-peropen.c: Dereference without locking.
Diffstat (limited to 'libnetfs/make-peropen.c')
-rw-r--r-- | libnetfs/make-peropen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libnetfs/make-peropen.c b/libnetfs/make-peropen.c index f7be58b1..413e9140 100644 --- a/libnetfs/make-peropen.c +++ b/libnetfs/make-peropen.c @@ -31,7 +31,7 @@ netfs_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, 1); po->openstat = flags; po->np = np; po->path = NULL; |