From owner-svn-src-head@freebsd.org Tue Dec 22 21:35:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B47FA4F5BE; Tue, 22 Dec 2015 21:35:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D9AC1486; Tue, 22 Dec 2015 21:35:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E14B2B94C; Tue, 22 Dec 2015 16:35:43 -0500 (EST) From: John Baldwin To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r292626 - head/sys/kern Date: Tue, 22 Dec 2015 13:17:10 -0800 Message-ID: <3052030.KADVjZoIBd@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201512222107.tBML7XUO053901@repo.freebsd.org> References: <201512222107.tBML7XUO053901@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 22 Dec 2015 16:35:44 -0500 (EST) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 21:35:45 -0000 On Tuesday, December 22, 2015 09:07:33 PM Garrett Cooper wrote: > Author: ngie > Date: Tue Dec 22 21:07:33 2015 > New Revision: 292626 > URL: https://svnweb.freebsd.org/changeset/base/292626 > > Log: > Fold lim_shared into lim_copy to mute a -Wunused compiler warning from > clang when the kernel is compiled without INVARIANTS > > Differential Revision: https://reviews.freebsd.org/D4683 > Reviewed by: kib, jhb > MFC after: 1 week > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/kern/kern_resource.c > > Modified: head/sys/kern/kern_resource.c > ============================================================================== > --- head/sys/kern/kern_resource.c Tue Dec 22 20:40:34 2015 (r292625) > +++ head/sys/kern/kern_resource.c Tue Dec 22 21:07:33 2015 (r292626) > @@ -80,8 +80,6 @@ static int donice(struct thread *td, str > static struct uidinfo *uilookup(uid_t uid); > static void ruxagg_locked(struct rusage_ext *rux, struct thread *td); > > -static __inline int lim_shared(struct plimit *limp); > - > /* > * Resource controls and accounting. > */ > @@ -1109,13 +1107,6 @@ lim_hold(struct plimit *limp) > return (limp); > } > > -static __inline int > -lim_shared(struct plimit *limp) > -{ > - > - return (limp->pl_refcnt > 1); > -} > - > void > lim_fork(struct proc *p1, struct proc *p2) > { > @@ -1146,7 +1137,7 @@ void > lim_copy(struct plimit *dst, struct plimit *src) > { > > - KASSERT(!lim_shared(dst), ("lim_copy to shared limit")); > + KASSERT(dst->pl_refcnt <= 1, ("lim_copy to shared limit")); It shouldn't be zero, I think == 1 would be best actually. -- John Baldwin