Author: rmacklem
Date: Wed Apr  3 03:50:16 2019
New Revision: 345828
URL: https://svnweb.freebsd.org/changeset/base/345828

Log:
  Add a comment to the r345818 patch to explain why cl_refs is initialized to 2.
  
  PR:           235582
  MFC after:    2 weeks

Modified:
  head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c

Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
==============================================================================
--- head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c    Wed Apr  3 03:30:57 2019        
(r345827)
+++ head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c    Wed Apr  3 03:50:16 2019        
(r345828)
@@ -568,6 +568,11 @@ svc_rpc_gss_create_client(void)
 
        client = mem_alloc(sizeof(struct svc_rpc_gss_client));
        memset(client, 0, sizeof(struct svc_rpc_gss_client));
+
+       /*
+        * Set the initial value of cl_refs to two.  One for the caller
+        * and the other to hold onto the client structure until it expires.
+        */
        refcount_init(&client->cl_refs, 2);
        sx_init(&client->cl_lock, "GSS-client");
        getcredhostid(curthread->td_ucred, &hostid);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to