/* This function returns zero in case of success and a negative error code in case of failure.  */
static int replay_buds(struct ubifs_info *c)
/* This function returns zero in case of success and a negative error code in case of failure.  */
static int replay_buds(struct ubifs_info *c)
{
	struct bud_entry *b;
	int err;
	unsigned long long prev_sqnum = 0;
	list_for_each_entry(b, &c->replay_buds, list) {
		err = replay_bud(c, b);
		if (err)
			return err;
		ubifs_assert(b->sqnum > prev_sqnum);
		prev_sqnum = b->sqnum;
	}
	return 0;
}