[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH 40/66] gfs2_edit savemeta: save_inode_data backward for gfs1



From: Bob Peterson <rpeterso redhat com>

The logic in "gfs2_edit savemeta" was wrong for saving inode blocks.
This patch fixes the logic.

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

diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 665af07..8ccbf8a 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -121,9 +121,9 @@ static int get_gfs_struct_info(struct gfs2_buffer_head *lbh, int *block_type,
 		break;
 	case GFS2_METATYPE_DI:   /* 4 (disk inode) */
 		if (sbd.gfs1)
-			inode = inode_get(&sbd, lbh);
-		else
 			inode = gfs_inode_get(&sbd, lbh);
+		else
+			inode = inode_get(&sbd, lbh);
 		if (S_ISDIR(inode->i_di.di_mode) ||
 		     (sbd.gfs1 && inode->i_di.__pad1 == GFS_FILE_DIR))
 			*gstruct_len = sbd.bsize;
@@ -455,9 +455,9 @@ static void save_inode_data(struct metafd *mfd)
 		osi_list_init(&metalist[i]);
 	metabh = bread(&sbd, block);
 	if (sbd.gfs1)
-		inode = inode_get(&sbd, metabh);
-	else
 		inode = gfs_inode_get(&sbd, metabh);
+	else
+		inode = inode_get(&sbd, metabh);
 	height = inode->i_di.di_height;
 	/* If this is a user inode, we don't follow to the file height.
 	   We stop one level less.  That way we save off the indirect
-- 
1.7.7.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]