1*f1a8151dSFrançois Tigeot /*- 2*f1a8151dSFrançois Tigeot * Copyright (c) 2010 Isilon Systems, Inc. 3*f1a8151dSFrançois Tigeot * Copyright (c) 2010 iX Systems, Inc. 4*f1a8151dSFrançois Tigeot * Copyright (c) 2010 Panasas, Inc. 5*f1a8151dSFrançois Tigeot * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. 6*f1a8151dSFrançois Tigeot * All rights reserved. 7*f1a8151dSFrançois Tigeot * 8*f1a8151dSFrançois Tigeot * Redistribution and use in source and binary forms, with or without 9*f1a8151dSFrançois Tigeot * modification, are permitted provided that the following conditions 10*f1a8151dSFrançois Tigeot * are met: 11*f1a8151dSFrançois Tigeot * 1. Redistributions of source code must retain the above copyright 12*f1a8151dSFrançois Tigeot * notice unmodified, this list of conditions, and the following 13*f1a8151dSFrançois Tigeot * disclaimer. 14*f1a8151dSFrançois Tigeot * 2. Redistributions in binary form must reproduce the above copyright 15*f1a8151dSFrançois Tigeot * notice, this list of conditions and the following disclaimer in the 16*f1a8151dSFrançois Tigeot * documentation and/or other materials provided with the distribution. 17*f1a8151dSFrançois Tigeot * 18*f1a8151dSFrançois Tigeot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19*f1a8151dSFrançois Tigeot * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20*f1a8151dSFrançois Tigeot * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21*f1a8151dSFrançois Tigeot * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22*f1a8151dSFrançois Tigeot * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23*f1a8151dSFrançois Tigeot * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24*f1a8151dSFrançois Tigeot * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25*f1a8151dSFrançois Tigeot * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26*f1a8151dSFrançois Tigeot * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27*f1a8151dSFrançois Tigeot * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28*f1a8151dSFrançois Tigeot */ 29*f1a8151dSFrançois Tigeot 30*f1a8151dSFrançois Tigeot #include <sys/param.h> 31*f1a8151dSFrançois Tigeot #include <linux/rbtree.h> 32*f1a8151dSFrançois Tigeot 33*f1a8151dSFrançois Tigeot /* Undo Linux compat changes. */ 34*f1a8151dSFrançois Tigeot #undef RB_ROOT 35*f1a8151dSFrançois Tigeot #undef file 36*f1a8151dSFrançois Tigeot #undef cdev 37*f1a8151dSFrançois Tigeot #define RB_ROOT(head) (head)->rbh_root 38*f1a8151dSFrançois Tigeot 39*f1a8151dSFrançois Tigeot int 40*f1a8151dSFrançois Tigeot panic_cmp(struct rb_node *one, struct rb_node *two) 41*f1a8151dSFrançois Tigeot { 42*f1a8151dSFrançois Tigeot panic("no cmp"); 43*f1a8151dSFrançois Tigeot } 44*f1a8151dSFrançois Tigeot 45*f1a8151dSFrançois Tigeot RB_GENERATE(linux_root, rb_node, __entry, panic_cmp); 46