kern_mbuf.c (151976) | kern_mbuf.c (152035) |
---|---|
1/*- 2 * Copyright (c) 2004, 2005, 3 * Bosko Milekic <bmilekic@FreeBSD.org>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004, 2005, 3 * Bosko Milekic <bmilekic@FreeBSD.org>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/kern/kern_mbuf.c 151976 2005-11-02 16:20:36Z andre $"); | 29__FBSDID("$FreeBSD: head/sys/kern/kern_mbuf.c 152035 2005-11-04 17:20:53Z andre $"); |
30 31#include "opt_mac.h" 32#include "opt_param.h" 33 34#include <sys/param.h> 35#include <sys/mac.h> 36#include <sys/malloc.h> 37#include <sys/systm.h> --- 352 unchanged lines hidden (view full) --- 390} 391 392/* 393 * The Mbuf Cluster zone destructor. 394 */ 395static void 396mb_dtor_clust(void *mem, int size, void *arg) 397{ | 30 31#include "opt_mac.h" 32#include "opt_param.h" 33 34#include <sys/param.h> 35#include <sys/mac.h> 36#include <sys/malloc.h> 37#include <sys/systm.h> --- 352 unchanged lines hidden (view full) --- 390} 391 392/* 393 * The Mbuf Cluster zone destructor. 394 */ 395static void 396mb_dtor_clust(void *mem, int size, void *arg) 397{ |
398 u_int *refcnt; | |
399 | 398 |
400 refcnt = uma_find_refcnt(zone_clust, mem); 401 KASSERT(*refcnt == 1, ("%s: refcnt incorrect %u", __func__, *refcnt)); 402 *refcnt = 0; | 399 KASSERT(*(uma_find_refcnt(zone_clust, mem)) <= 1, 400 ("%s: refcnt incorrect %u", __func__, 401 *(uma_find_refcnt(zone_clust, mem))) ); |
403#ifdef INVARIANTS 404 trash_dtor(mem, size, arg); 405#endif 406} 407 408/* 409 * The Packet secondary zone's init routine, executed on the 410 * object's transition from mbuf keg slab to zone cache. --- 104 unchanged lines hidden --- | 402#ifdef INVARIANTS 403 trash_dtor(mem, size, arg); 404#endif 405} 406 407/* 408 * The Packet secondary zone's init routine, executed on the 409 * object's transition from mbuf keg slab to zone cache. --- 104 unchanged lines hidden --- |