diff options
Diffstat (limited to 'libnetfs/io-restrict-auth.c')
-rw-r--r-- | libnetfs/io-restrict-auth.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libnetfs/io-restrict-auth.c b/libnetfs/io-restrict-auth.c index 0c3403d8..79b7d095 100644 --- a/libnetfs/io-restrict-auth.c +++ b/libnetfs/io-restrict-auth.c @@ -43,6 +43,7 @@ netfs_S_io_restrict_auth (struct protid *user, return err; pthread_mutex_lock (&user->po->np->lock); + refcount_ref (&user->po->refcnt); newpi = netfs_make_protid (user->po, new_user); if (newpi) { @@ -52,6 +53,7 @@ netfs_S_io_restrict_auth (struct protid *user, } else { + refcount_deref (&user->po->refcnt); pthread_mutex_unlock (&user->po->np->lock); iohelp_free_iouser (new_user); err = ENOMEM; |