[Ocfs2-tools-devel] [PATCH 06/10] dx_dirs v6: add missed 'ocfs2_filesys *fs' parameter

Coly Li coly.li at suse.de
Thu Jan 28 12:41:31 PST 2010


This patch add 'ocfs2_filesys *fs' parameter to ocfs2_swap_dx_root_to_cpu(), and fix the mismatched arguments when
alling ocfs2_swap_extent_list_to_cpu().

Signed-off-by: Coly Li <coly.li at suse.de>
Cc: Mark Fasheh <mfasheh at suse.com>
---
 libocfs2/dirblock.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/libocfs2/dirblock.c b/libocfs2/dirblock.c
index 4bf48f3..06a1b64 100644
--- a/libocfs2/dirblock.c
+++ b/libocfs2/dirblock.c
@@ -254,7 +254,8 @@ static void ocfs2_swap_dx_entry_list_to_cpu(struct ocfs2_dx_entry_list *dl_list)
 		ocfs2_swap_dx_entry_to_cpu(&dl_list->de_entries[i]);
 }

-static void ocfs2_swap_dx_root_to_cpu(struct ocfs2_dx_root_block *dx_root)
+static void ocfs2_swap_dx_root_to_cpu(ocfs2_filesys *fs,
+				struct ocfs2_dx_root_block *dx_root)
 {
 	if (cpu_is_little_endian)
 		return;
@@ -272,7 +273,7 @@ static void ocfs2_swap_dx_root_to_cpu(struct ocfs2_dx_root_block *dx_root)
 	if (dx_root->dr_flags & OCFS2_DX_FLAG_INLINE)
 		ocfs2_swap_dx_entry_list_to_cpu(&dx_root->dr_entries);
 	else
-		ocfs2_swap_extent_list_to_cpu(&dx_root->dr_list);
+		ocfs2_swap_extent_list_to_cpu(fs, dx_root, &dx_root->dr_list);
 }

 errcode_t ocfs2_read_dx_root(ocfs2_filesys *fs, uint64_t block,
@@ -294,7 +295,7 @@ errcode_t ocfs2_read_dx_root(ocfs2_filesys *fs, uint64_t block,
 		   strlen(OCFS2_DX_ROOT_SIGNATURE)))
 		return OCFS2_ET_DIR_CORRUPTED;

-	ocfs2_swap_dx_root_to_cpu(dx_root);
+	ocfs2_swap_dx_root_to_cpu(fs, dx_root);

 	return 0;
 }
-- 
1.6.4.2

-- 
Coly Li
SuSE Labs



More information about the Ocfs2-tools-devel mailing list