aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-04-06 22:01:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 11:31:19 -0400
commite62687468588f47c32256e3c8c36157c40111b6e (patch)
tree00b9532341e606868567c03b8c3a631d0bf19b46 /fs/nilfs2
parent1f5abe7e7dbcd83e73212c6cb135a6106cea6a0b (diff)
nilfs2: super block operations fix endian bug
This adds a missing endian conversion of checksum field in the super block. This fixes compatibility issue on big endian machines which will come to surface after supporting recovery of super block. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2')
-rw-r--r--fs/nilfs2/super.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index d0639a6aae9e..b7519c327ba7 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -287,9 +287,9 @@ int nilfs_commit_super(struct nilfs_sb_info *sbi)
287 sbp->s_free_blocks_count = cpu_to_le64(nfreeblocks); 287 sbp->s_free_blocks_count = cpu_to_le64(nfreeblocks);
288 sbp->s_wtime = cpu_to_le64(get_seconds()); 288 sbp->s_wtime = cpu_to_le64(get_seconds());
289 sbp->s_sum = 0; 289 sbp->s_sum = 0;
290 sbp->s_sum = crc32_le(nilfs->ns_crc_seed, (unsigned char *)sbp, 290 sbp->s_sum = cpu_to_le32(crc32_le(nilfs->ns_crc_seed,
291 le16_to_cpu(sbp->s_bytes)); 291 (unsigned char *)sbp,
292 292 le16_to_cpu(sbp->s_bytes)));
293 sbi->s_super->s_dirt = 0; 293 sbi->s_super->s_dirt = 0;
294 return nilfs_sync_super(sbi); 294 return nilfs_sync_super(sbi);
295} 295}