--- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -989,6 +989,10 @@ static int gfs2_ri_update(struct gfs2_in if (error < 0) return error; + if (RB_EMPTY_ROOT(&sdp->sd_rindex_tree)) { + fs_err(sdp, "no resource groups found in the file system.\n"); + return -ENOENT; + } set_rgrp_preferences(sdp); sdp->sd_rindex_uptodate = 1;