]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nilfs2/super.c
nilfs2: simplify handling of active state of segments
[linux-2.6-omap-h63xx.git] / fs / nilfs2 / super.c
index d0639a6aae9e4a382c03635666ef45b80bb50c65..ef31e9a51c845404cc9df852d5920cf99b4c670b 100644 (file)
@@ -287,9 +287,9 @@ int nilfs_commit_super(struct nilfs_sb_info *sbi)
        sbp->s_free_blocks_count = cpu_to_le64(nfreeblocks);
        sbp->s_wtime = cpu_to_le64(get_seconds());
        sbp->s_sum = 0;
-       sbp->s_sum = crc32_le(nilfs->ns_crc_seed, (unsigned char *)sbp,
-                             le16_to_cpu(sbp->s_bytes));
-
+       sbp->s_sum = cpu_to_le32(crc32_le(nilfs->ns_crc_seed,
+                                         (unsigned char *)sbp,
+                                         le16_to_cpu(sbp->s_bytes)));
        sbi->s_super->s_dirt = 0;
        return nilfs_sync_super(sbi);
 }
@@ -868,7 +868,7 @@ nilfs_fill_super(struct super_block *sb, void *data, int silent,
        }
 
        if (!(sb->s_flags & MS_RDONLY)) {
-               err = nilfs_attach_segment_constructor(sbi, NULL);
+               err = nilfs_attach_segment_constructor(sbi);
                if (err)
                        goto failed_checkpoint;
        }
@@ -1001,7 +1001,7 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
                nilfs_clear_opt(sbi, SNAPSHOT);
                sbi->s_snapshot_cno = 0;
 
-               err = nilfs_attach_segment_constructor(sbi, NULL);
+               err = nilfs_attach_segment_constructor(sbi);
                if (err)
                        goto rw_remount_failed;