Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Nov 2020 09:19:03 -0800
From:      John Baldwin <jhb@FreeBSD.org>
To:        Mateusz Guzik <mjg@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r367694 - in head/sys: kern sys
Message-ID:  <f0f9ebfd-1ee4-c932-0984-073da6fb8873@FreeBSD.org>
In-Reply-To: <202011141921.0AEJLkAu055910@repo.freebsd.org>
References:  <202011141921.0AEJLkAu055910@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/14/20 11:21 AM, Mateusz Guzik wrote:
> Author: mjg
> Date: Sat Nov 14 19:21:46 2020
> New Revision: 367694
> URL: https://svnweb.freebsd.org/changeset/base/367694
> 
> Log:
>   thread: batch resource limit free calls
> 
> Modified:
>   head/sys/kern/kern_resource.c
>   head/sys/kern/kern_thread.c
>   head/sys/sys/resourcevar.h
> 
> Modified: head/sys/kern/kern_resource.c
> ==============================================================================
> --- head/sys/kern/kern_resource.c	Sat Nov 14 19:20:58 2020	(r367693)
> +++ head/sys/kern/kern_resource.c	Sat Nov 14 19:21:46 2020	(r367694)
> @@ -1236,6 +1236,14 @@ lim_free(struct plimit *limp)
>  		free((void *)limp, M_PLIMIT);
>  }
>  
> +void
> +lim_freen(struct plimit *limp, int n)
> +{
> +
> +	if (refcount_releasen(&limp->pl_refcnt, n))
> +		free((void *)limp, M_PLIMIT);

You don't need this cast.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f0f9ebfd-1ee4-c932-0984-073da6fb8873>