/* Return the next object in the object_list. The function decrements the use_count of the previous object and increases that of the next one.  */
static void* kmemleak_seq_next(struct seq_file *seq, void *v, loff_t *pos)
/* Return the next object in the object_list. The function decrements the use_count of the previous object and increases that of the next one.  */
static void* kmemleak_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
	struct kmemleak_object *prev_obj = v;
	struct kmemleak_object *next_obj = NULL;
	struct list_head *n = &prev_obj->object_list;
	++(*pos);
	list_for_each_continue_rcu(n, &object_list) {
		next_obj = list_entry(n, struct kmemleak_object, object_list);
		if (get_object(next_obj))
			break;
	}
	put_object(prev_obj);
	return next_obj;
}