/* This is a comparios function for 'list_sort()' which compares 2 replay entries  */
static int replay_entries_cmp(void *priv, struct list_head *a, struct list_head *b)
/* This is a comparios function for 'list_sort()' which compares 2 replay entries  */
static int replay_entries_cmp(void *priv, struct list_head *a, struct list_head *b)
{
	struct replay_entry *ra, *rb;
	cond_resched();
	if (a == b)
		return 0;
	ra = list_entry(a, struct replay_entry, list);
	rb = list_entry(b, struct replay_entry, list);
	ubifs_assert(ra->sqnum != rb->sqnum);
	if (ra->sqnum > rb->sqnum)
		return 1;
	return -1;
}