Date: Tue, 22 Dec 2015 13:17:10 -0800 From: John Baldwin <jhb@freebsd.org> To: Garrett Cooper <ngie@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r292626 - head/sys/kern Message-ID: <3052030.KADVjZoIBd@ralph.baldwin.cx> In-Reply-To: <201512222107.tBML7XUO053901@repo.freebsd.org> References: <201512222107.tBML7XUO053901@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3052030.KADVjZoIBd>