On Mon, Feb 03, 2020 at 05:37:01PM +0100, Bj??rn Ketelaars wrote:
> On Mon 27/01/2020 20:01, Bj??rn Ketelaars wrote:
> > 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.
>
> OK?
OK bluhm@
> Diff enclosed again for your convenience.
>
>
> 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);
> }
>
> /*