Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[safe/jmp/linux-2.6] / fs / nilfs2 / super.c
index f068270..48145f5 100644 (file)
@@ -298,7 +298,7 @@ int nilfs_commit_super(struct nilfs_sb_info *sbi, int dupsb)
                memcpy(sbp[1], sbp[0], nilfs->ns_sbsize);
                nilfs->ns_sbwtime[1] = t;
        }
-       sbi->s_super->s_dirt = 0;
+       clear_nilfs_sb_dirty(nilfs);
        return nilfs_sync_super(sbi, dupsb);
 }
 
@@ -342,7 +342,7 @@ static int nilfs_sync_fs(struct super_block *sb, int wait)
                err = nilfs_construct_segment(sb);
 
        down_write(&nilfs->ns_sem);
-       if (sb->s_dirt)
+       if (nilfs_sb_dirty(nilfs))
                nilfs_commit_super(sbi, 1);
        up_write(&nilfs->ns_sem);
 
@@ -436,7 +436,7 @@ static int nilfs_statfs(struct dentry *dentry, struct kstatfs *buf)
        /*
         * Compute the overhead
         *
-        * When distributing meta data blocks outside semgent structure,
+        * When distributing meta data blocks outside segment structure,
         * We must count them as the overhead.
         */
        overhead = 0;
@@ -749,6 +749,7 @@ nilfs_fill_super(struct super_block *sb, void *data, int silent,
        sb->s_export_op = &nilfs_export_ops;
        sb->s_root = NULL;
        sb->s_time_gran = 1;
+       sb->s_bdi = nilfs->ns_bdi;
 
        err = load_nilfs(nilfs, sbi);
        if (err)
@@ -866,7 +867,7 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
        if ((*flags & MS_RDONLY) &&
            sbi->s_snapshot_cno != old_opts.snapshot_cno) {
                printk(KERN_WARNING "NILFS (device %s): couldn't "
-                      "remount to a different snapshot. \n",
+                      "remount to a different snapshot.\n",
                       sb->s_id);
                err = -EINVAL;
                goto restore_opts;