diff options
author | 2016-09-16 02:54:51 +0000 | |
---|---|---|
committer | 2016-09-16 02:54:51 +0000 | |
commit | efa6250000aeea2f244bc5c3337f80829c8601d4 (patch) | |
tree | 4ca039d85ac3d2d25fb618be28c8d936a0a4e4a4 /sys/kern/vfs_subr.c | |
parent | fix some DEBUG code so its using the right rb tree code (diff) | |
download | wireguard-openbsd-efa6250000aeea2f244bc5c3337f80829c8601d4.tar.xz wireguard-openbsd-efa6250000aeea2f244bc5c3337f80829c8601d4.zip |
move buf_rb_bufs from RB macros to RBT functions
i had to shuffle the order of some header bits cos RBT_PROTOTYPE
needs to see what RBT_HEAD produces.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 2bdb9abed61..dc80da9ef95 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.251 2016/09/15 02:00:16 dlg Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.252 2016/09/16 02:54:51 dlg Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -122,11 +122,11 @@ void printlockedvnodes(void); struct pool vnode_pool; struct pool uvm_vnode_pool; -static int rb_buf_compare(struct buf *b1, struct buf *b2); -RB_GENERATE(buf_rb_bufs, buf, b_rbbufs, rb_buf_compare); +static inline int rb_buf_compare(const struct buf *b1, const struct buf *b2); +RBT_GENERATE(buf_rb_bufs, buf, b_rbbufs, rb_buf_compare); -static int -rb_buf_compare(struct buf *b1, struct buf *b2) +static inline int +rb_buf_compare(const struct buf *b1, const struct buf *b2) { if (b1->b_lblkno < b2->b_lblkno) return(-1); @@ -375,7 +375,7 @@ getnewvnode(enum vtagtype tag, struct mount *mp, struct vops *vops, vp = pool_get(&vnode_pool, PR_WAITOK | PR_ZERO); vp->v_uvm = pool_get(&uvm_vnode_pool, PR_WAITOK | PR_ZERO); vp->v_uvm->u_vnode = vp; - RB_INIT(&vp->v_bufs_tree); + RBT_INIT(buf_rb_bufs, &vp->v_bufs_tree); RB_INIT(&vp->v_nc_tree); TAILQ_INIT(&vp->v_cache_dst); numvnodes++; |