public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: gfs2-utils: master - GFS2: gfs2_fsck segfault in rindex repair code
Date: Tue, 04 Aug 2009 22:06:00 -0000	[thread overview]
Message-ID: <20090804220604.838F11201DE@lists.fedorahosted.org> (raw)

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;
-			
 		}
 	}
 	/* ------------------------------------------------------------- */


                 reply	other threads:[~2009-08-04 22:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090804220604.838F11201DE@lists.fedorahosted.org \
    --to=rpeterso@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).