[Ocfs2-devel] [PATCH 1/1] Fix an endian bug in online resize.

Tao Ma tao.ma at oracle.com
Sun Mar 2 18:53:02 PST 2008


In ocfs2_group_add, 'cr' is of type 'ocfs2_chain_rec', so here is
a endian bug. Fix it.

Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
 fs/ocfs2/resize.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c
index 37835ff..8166968 100644
--- a/fs/ocfs2/resize.c
+++ b/fs/ocfs2/resize.c
@@ -597,7 +597,7 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)
 		memset(cr, 0, sizeof(struct ocfs2_chain_rec));
 	}
 
-	cr->c_blkno = le64_to_cpu(input->group);
+	cr->c_blkno = cpu_to_le64(input->group);
 	le32_add_cpu(&cr->c_total, input->clusters * cl_bpc);
 	le32_add_cpu(&cr->c_free, input->frees * cl_bpc);
 
-- 
1.5.3.GIT



More information about the Ocfs2-devel mailing list