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: cluster: RHEL55 - GFS2: gfs2_fsck segfault in rindex repair code Date: Mon, 17 Aug 2009 16:15:00 -0000 [thread overview] Message-ID: <20090817161417.F185512022B@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=6c1c66f8bb8a12971fa48465de9f677b5f69d5b4 Commit: 6c1c66f8bb8a12971fa48465de9f677b5f69d5b4 Parent: c1da6a42b1bd533bbbe8b95f40bb872771313d3a Author: Bob Peterson <rpeterso@redhat.com> AuthorDate: Tue Aug 4 16:52:01 2009 -0500 Committer: Bob Peterson <rpeterso@redhat.com> CommitterDate: Mon Aug 17 11:01:35 2009 -0500 GFS2: gfs2_fsck segfault in rindex repair code This patch fixes a problem that caused the fsck.gfs2 program to segfault while trying to repair a damaged resource group index file. rhbz#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 003e9ff..e11b72b 100644 --- a/gfs2/fsck/rgrepair.c +++ b/gfs2/fsck/rgrepair.c @@ -369,6 +369,11 @@ 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; } @@ -540,12 +545,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-17 16:15 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=20090817161417.F185512022B@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: linkBe 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).