cluster: RHEL56 - gfs2_edit savemeta: Don't release indirect buffers too soon

Bob Peterson rpeterso at fedoraproject.org
Sat Apr 10 04:54:22 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=27ddb92542bfa62d94e7e2496e717f84aaef53f6
Commit:        27ddb92542bfa62d94e7e2496e717f84aaef53f6
Parent:        1b06b8a4e4f9b36566b6ea15a094243ae06dc0e2
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Wed Feb 10 13:46:58 2010 -0600
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Fri Apr 9 23:45:34 2010 -0500

gfs2_edit savemeta: Don't release indirect buffers too soon

This patch fixes a regression in the "gfs2_edit savemeta" command
whereby system files such as journals were not being saved.
The function that processes indirect block lists was releasing
buffers in a fashion that works okay with the old buf.c
assumptions but too soon for the new buf.c assumptions.

rhbz#455300
---
 gfs2/edit/savemeta.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index b630280..1b5c2c1 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -289,9 +289,7 @@ static void save_indirect_blocks(int out_fd, osi_list_t *cur_list,
 		}
 		if (height != hgt) { /* If not at max height */
 			nbh = bread(&sbd, indir_block);
-			osi_list_add_prev(&nbh->b_altlist,
-					  cur_list);
-			brelse(nbh);
+			osi_list_add_prev(&nbh->b_altlist, cur_list);
 		}
 	} /* for all data on the indirect block */
 }


More information about the cluster-commits mailing list