public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* gfs2-utils: master - GFS2: gfs2_fsck segfault in rindex repair code
@ 2009-08-04 22:06 Bob Peterson
  0 siblings, 0 replies; only message in thread
From: Bob Peterson @ 2009-08-04 22:06 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=15e280c0799675d86ec33dcf5839b9f758ba90f9
Commit:        15e280c0799675d86ec33dcf5839b9f758ba90f9
Parent:        efd003c0a4c772424b553d90c8afaa964ee13d6e
Author:        Bob Peterson <rpeterso@redhat.com>
AuthorDate:    Tue Aug 4 17:00:16 2009 -0500
Committer:     Bob Peterson <rpeterso@redhat.com>
CommitterDate: Tue Aug 4 17:02:38 2009 -0500

GFS2: gfs2_fsck segfault in rindex repair code

bz 514018
---
 gfs2/fsck/rgrepair.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gfs2/fsck/rgrepair.c b/gfs2/fsck/rgrepair.c
index 0aa20d4..64271cd 100644
--- a/gfs2/fsck/rgrepair.c
+++ b/gfs2/fsck/rgrepair.c
@@ -371,6 +371,11 @@ static int gfs2_rindex_calculate(struct gfs2_sbd *sdp, osi_list_t *ret_list,
 	/* ----------------------------------------------------------------- */
 	*num_rgs = sdp->md.riinode->i_di.di_size / sizeof(struct gfs2_rindex);
 	log_warn( _("L2: number of rgs in the index = %d.\n"), *num_rgs);
+	/* Move the rg list to the return list */
+	ret_list->next = sdp->rglist.next;
+	ret_list->prev = sdp->rglist.prev;
+	ret_list->next->prev = ret_list;
+	ret_list->prev->next = ret_list;
 	return 0;
 }
 
@@ -541,12 +546,11 @@ int rg_repair(struct gfs2_sbd *sdp, int trust_lvl, int *rg_count)
 					free(actual->bh);
 				if (actual->bits)
 					free(actual->bits);
-				gfs2_compute_bitstructs(sdp, actual);
 			}
 			else
 				log_err( _("RG index not fixed.\n"));
+			gfs2_compute_bitstructs(sdp, actual);
 			rindex_modified = FALSE;
-			
 		}
 	}
 	/* ------------------------------------------------------------- */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-04 22:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-04 22:06 gfs2-utils: master - GFS2: gfs2_fsck segfault in rindex repair code Bob Peterson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).