From afea5285b0e40b68f97b47f0f0edc471b554fb34 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Sun, 7 Feb 2016 01:33:00 -0500 Subject: 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. --- libnetfs/make-protid.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libnetfs/make-protid.c') diff --git a/libnetfs/make-protid.c b/libnetfs/make-protid.c index bf18283c..995ac1ea 100644 --- a/libnetfs/make-protid.c +++ b/libnetfs/make-protid.c @@ -36,7 +36,6 @@ netfs_make_protid (struct peropen *po, struct iouser *cred) if (errno) return 0; - po->refcnt++; pi->po = po; pi->user = cred; pi->shared_object = MACH_PORT_NULL; -- cgit v1.2.3