/* Returns: The next rgrp in the recent list  */
static struct gfs2_rgrpd* recent_rgrp_next(struct gfs2_rgrpd *cur_rgd)
/* Returns: The next rgrp in the recent list  */
static struct gfs2_rgrpd* recent_rgrp_next(struct gfs2_rgrpd *cur_rgd)
{
	struct gfs2_sbd *sdp = cur_rgd->rd_sbd;
	struct list_head *head;
	struct gfs2_rgrpd *rgd;
	spin_lock(&sdp->sd_rindex_spin);
	head = &sdp->sd_rindex_mru_list;
	if (unlikely(cur_rgd->rd_list_mru.next == head)) {
		spin_unlock(&sdp->sd_rindex_spin);
		return NULL;
	}
	rgd = list_entry(cur_rgd->rd_list_mru.next, struct gfs2_rgrpd, rd_list_mru);
	spin_unlock(&sdp->sd_rindex_spin);
	return rgd;
}