From owner-svn-src-all@freebsd.org Tue Dec 22 21:07:34 2015 Return-Path: Delivered-To: svn-src-all@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 8EF4AA4FBF3; Tue, 22 Dec 2015 21:07:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E97613B7; Tue, 22 Dec 2015 21:07:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBML7XMm053902; Tue, 22 Dec 2015 21:07:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBML7XUO053901; Tue, 22 Dec 2015 21:07:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512222107.tBML7XUO053901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 22 Dec 2015 21:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292626 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 21:07:34 -0000 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")); bcopy(src->pl_rlimit, dst->pl_rlimit, sizeof(src->pl_rlimit)); }