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

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=212f926220e45c0366ba23dc4bb9e5306fcc21ad
Commit:        212f926220e45c0366ba23dc4bb9e5306fcc21ad
Parent:        4011cf6737f4155f8e4f277c10ce4fb568024a9c
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:00:16 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 ca16ba5..d0b8f33 100644
--- a/gfs2/fsck/rgrepair.c
+++ b/gfs2/fsck/rgrepair.c
@@ -369,6 +369,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;
 }
 
@@ -539,12 +544,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:07 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:07 cluster: STABLE3 - 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).