File gfs2_edit_has_problems_printing_gfs1_journals.patch of Package cluster

commit d7f914ed829bdcddbc69fcc0c152142d12f3cd1b
Author: Bob Peterson <>
Date:   Thu Feb 3 08:13:35 2011 -0600

    gfs2_edit: has problems printing gfs1 journals
    The gfs2_edit tool was releasing the buffer too soon while printing out
    journals.  It worked for gfs2 journals, but not for gfs1 journals.  This
    patch moves the buffer release later in the function so that gfs1 journals
    will print correctly.

diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index 4fc8a43..fd12c0d 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -2023,7 +2023,6 @@ static uint64_t find_journal_block(const char *journal, uint64_t *j_size)
 	if (!gfs1)
 		do_dinode_extended(&di, jindex_bh); /* parse dir. */
-	brelse(jindex_bh);
 	if (gfs1) {
 		struct gfs2_inode *jiinode;
@@ -2048,6 +2047,7 @@ static uint64_t find_journal_block(const char *journal, uint64_t *j_size)
 		*j_size = jdi.di_size;
+	brelse(jindex_bh);
 	return jblock;