/* ubifs_create_buds_lists - create journal head buds lists for remount rw.  */
void ubifs_create_buds_lists(struct ubifs_info *c)
/* ubifs_create_buds_lists - create journal head buds lists for remount rw.  */
void ubifs_create_buds_lists(struct ubifs_info *c)
{
	struct rb_node *p;
	spin_lock(&c->buds_lock);
	p = rb_first(&c->buds);
	while (p) {
		struct ubifs_bud *bud = rb_entry(p, struct ubifs_bud, rb);
		struct ubifs_jhead *jhead = &c->jheads[bud->jhead];
		list_add_tail(&bud->list, &jhead->buds_list);
		p = rb_next(p);
	}
	spin_unlock(&c->buds_lock);
}