Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jan 2011 18:28:30 GMT
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 188272 for review
Message-ID:  <201101281828.p0SISUhp082163@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@188272?ac=10

Change 188272 by trasz@trasz_victim on 2011/01/28 18:27:45

	Remove ugly hack that stopped being useful for debugging some time
	ago and fix descriptions in a few KASSERTs.

Affected files ...

.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_rctl.c#20 edit
.. //depot/projects/soc2009/trasz_limits/sys/sys/rctl.h#9 edit

Differences ...

==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_rctl.c#20 (text+ko) ====

@@ -684,7 +684,7 @@
 rctl_rule_acquire(struct rctl_rule *rule)
 {
 
-	KASSERT(rule->rr_refcount > 0, ("rule->rr_refcount > 0"));
+	KASSERT(rule->rr_refcount > 0, ("rule->rr_refcount <= 0"));
 
 	refcount_acquire(&rule->rr_refcount);
 }
@@ -696,7 +696,7 @@
 	
 	rule = (struct rctl_rule *)context;
 
-	KASSERT(rule->rr_refcount == 0, ("rule->rr_refcount == 0"));
+	KASSERT(rule->rr_refcount == 0, ("rule->rr_refcount != 0"));
 	
 	/*
 	 * We don't need locking here; rule is guaranteed to be inaccessible.
@@ -710,7 +710,7 @@
 rctl_rule_release(struct rctl_rule *rule)
 {
 
-	KASSERT(rule->rr_refcount > 0, ("rule->rr_refcount > 0"));
+	KASSERT(rule->rr_refcount > 0, ("rule->rr_refcount <= 0"));
 
 	if (refcount_release(&rule->rr_refcount)) {
 		/*
@@ -1656,7 +1656,7 @@
 			if (rule == NULL)
 				goto fail;
 			KASSERT(rule->rr_subject.rs_proc == parent,
-			    ("rule->rr_subject.rs_proc == parent"));
+			    ("rule->rr_subject.rs_proc != parent"));
 			rule->rr_subject.rs_proc = child;
 			error = rctl_container_add_rule_locked(child->p_container, rule);
 			rctl_rule_release(rule);

==== //depot/projects/soc2009/trasz_limits/sys/sys/rctl.h#9 (text+ko) ====

@@ -69,11 +69,7 @@
  */
 struct rctl_rule {
 	int		rr_subject_type;
-#ifdef DIAGNOSTIC
-	struct {
-#else
 	union {
-#endif
 		struct proc	*rs_proc;
 		struct uidinfo	*rs_uip;
 		struct loginclass *hr_loginclass;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101281828.p0SISUhp082163>