summaryrefslogtreecommitdiff
path: root/libnetfs/io-reauthenticate.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnetfs/io-reauthenticate.c')
-rw-r--r--libnetfs/io-reauthenticate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libnetfs/io-reauthenticate.c b/libnetfs/io-reauthenticate.c
index 8ff4182b..b2d4a440 100644
--- a/libnetfs/io-reauthenticate.c
+++ b/libnetfs/io-reauthenticate.c
@@ -34,12 +34,14 @@ netfs_S_io_reauthenticate (struct protid *user, mach_port_t rend_port)
/* This routine must carefully ignore EINTR because we
are a simpleroutine, so callers won't know to restart. */
+ refcount_ref (&user->po->refcnt);
pthread_mutex_lock (&user->po->np->lock);
do
newpi = netfs_make_protid (user->po, 0);
while (! newpi && errno == EINTR);
if (! newpi)
{
+ refcount_deref (&user->po->refcnt);
pthread_mutex_unlock (&user->po->np->lock);
return errno;
}