Add a comment to the r345818 patch to explain why cl_refs is initialized to 2.

PR:		235582
MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2019-04-03 03:50:16 +00:00
parent b0e14530a0
commit 1406895958
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345828

View File

@ -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);