From: Tao Ma Date: Mon, 3 Mar 2008 02:53:02 +0000 (+0800) Subject: ocfs2: Fix an endian bug in online resize. X-Git-Tag: v2.6.25-rc6~50^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4338ab6a750303cbae4cc76cc7de5edba6598ebe;p=linux-2.6-omap-h63xx.git ocfs2: Fix an endian bug in online resize. In ocfs2_group_add, 'cr' is a disk field of type 'ocfs2_chain_rec', and we were putting cpu byteorder values into it. Swap things to the right endian before storing. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh --- diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c index 37835ffcb03..8166968e901 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);