/* Apply the replay tree. Returns zero in case of success and a negative error code in case of failure.  */
static int apply_replay_tree(struct ubifs_info *c)
/* Apply the replay tree. Returns zero in case of success and a negative error code in case of failure.  */
static int apply_replay_tree(struct ubifs_info *c)
{
	struct rb_node *this = rb_first(&c->replay_tree);
	while (this) {
		struct replay_entry *r;
		int err;
		cond_resched();
		r = rb_entry(this, struct replay_entry, rb);
		err = apply_replay_entry(c, r);
		if (err)
			return err;
		this = rb_next(this);
	}
	return 0;
}