cheloha@ recently replaced custom TAILQ concatenation loops in pool(9) with TAILQ_CONCAT(3) [0]. I was curious as how often these custom concatenations loops are used and grepped src. I found a couple of them. One being in sys/ufs/ffs/ffs_softdep.c, and the others in userland.
I build a kernel using the diff below and gave it a spin. So far it didn't blow up. I was wondering if it makes sense to address these custom concatenations and provide diffs, or is this considered nitpicking? [0] http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/kern/subr_pool.c.diff?r1=1.229&r2=1.230 diff --git sys/ufs/ffs/ffs_softdep.c sys/ufs/ffs/ffs_softdep.c index 2f2a2edc224..d0fd3a15278 100644 --- sys/ufs/ffs/ffs_softdep.c +++ sys/ufs/ffs/ffs_softdep.c @@ -4486,10 +4486,7 @@ merge_inode_lists(struct inodedep *inodedep) } newadp = TAILQ_FIRST(&inodedep->id_newinoupdt); } - while ((newadp = TAILQ_FIRST(&inodedep->id_newinoupdt)) != NULL) { - TAILQ_REMOVE(&inodedep->id_newinoupdt, newadp, ad_next); - TAILQ_INSERT_TAIL(&inodedep->id_inoupdt, newadp, ad_next); - } + TAILQ_CONCAT(&inodedep->id_inoupdt, &inodedep->id_newinoupdt, ad_next); } /*