cluster: RHEL57 - gfs2_edit: has problems printing gfs1 journals

Bob Peterson rpeterso at fedoraproject.org
Wed Feb 2 21:16:11 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=524dca1221b851159bf45a702f111bd8952036d7
Commit:        524dca1221b851159bf45a702f111bd8952036d7
Parent:        4b4addea8835006a57ab1f8bf6ee9746b2b96e19
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Wed Feb 2 13:29:22 2011 -0600
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Wed Feb 2 14:36:09 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.

rhbz#656371
---
 gfs2/edit/hexedit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index 6b92390..5432fa2 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -2038,7 +2038,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;
@@ -2063,6 +2062,7 @@ static uint64_t find_journal_block(const char *journal, uint64_t *j_size)
 		*j_size = jdi.di_size;
 		brelse(j_bh);
 	}
+	brelse(jindex_bh);
 	return jblock;
 }
 


More information about the cluster-commits mailing list