summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_resource.c
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-12-29 19:56:26 +0000
committerngie <ngie@FreeBSD.org>2015-12-29 19:56:26 +0000
commit48b72481dba08c5185c1dd6a70b82b326be43d6b (patch)
treebfa4f047c73b138c59732a37297737fa1ffd3e91 /sys/kern/kern_resource.c
parentf8c5cd12c37a92500da3f42f1d25bae9cc70e30a (diff)
parentc0ae58548ada98f553239a091b8764ea9e1b474b (diff)
downloadFreeBSD-src-48b72481dba08c5185c1dd6a70b82b326be43d6b.zip
FreeBSD-src-48b72481dba08c5185c1dd6a70b82b326be43d6b.tar.gz
MFhead @ r292618
Diffstat (limited to 'sys/kern/kern_resource.c')
-rw-r--r--sys/kern/kern_resource.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index 4edbcba..cbcd680 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -80,8 +80,6 @@ static int donice(struct thread *td, struct proc *chgp, int n);
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));
}
OpenPOWER on IntegriCloud