sbi->file_count++;
        insert_inode_hash(inode);
        mark_inode_dirty(inode);
-       sb->s_dirt = 1;
+       hfsplus_mark_mdb_dirty(sb);
 
        return inode;
 }
 
        if (S_ISDIR(inode->i_mode)) {
                HFSPLUS_SB(sb)->folder_count--;
-               sb->s_dirt = 1;
+               hfsplus_mark_mdb_dirty(sb);
                return;
        }
        HFSPLUS_SB(sb)->file_count--;
                inode->i_size = 0;
                hfsplus_file_truncate(inode);
        }
-       sb->s_dirt = 1;
+       hfsplus_mark_mdb_dirty(sb);
 }
 
 void hfsplus_inode_read_fork(struct inode *inode, struct hfsplus_fork_raw *fork)
 
 
        if (fork->total_size != cpu_to_be64(inode->i_size)) {
                set_bit(HFSPLUS_SB_WRITEBACKUP, &sbi->flags);
-               inode->i_sb->s_dirt = 1;
+               hfsplus_mark_mdb_dirty(inode->i_sb);
        }
        hfsplus_inode_write_fork(inode, fork);
        if (tree)
 
        dprint(DBG_SUPER, "hfsplus_sync_fs\n");
 
-       sb->s_dirt = 0;
-
        /*
         * Explicitly write out the special metadata inodes.
         *
        return error;
 }
 
-static void hfsplus_write_super(struct super_block *sb)
+static void delayed_sync_fs(struct work_struct *work)
 {
-       if (!(sb->s_flags & MS_RDONLY))
-               hfsplus_sync_fs(sb, 1);
-       else
-               sb->s_dirt = 0;
+       struct hfsplus_sb_info *sbi;
+
+       sbi = container_of(work, struct hfsplus_sb_info, sync_work.work);
+
+       spin_lock(&sbi->work_lock);
+       sbi->work_queued = 0;
+       spin_unlock(&sbi->work_lock);
+
+       hfsplus_sync_fs(sbi->alloc_file->i_sb, 1);
+}
+
+void hfsplus_mark_mdb_dirty(struct super_block *sb)
+{
+       struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb);
+       unsigned long delay;
+
+       if (sb->s_flags & MS_RDONLY)
+               return;
+
+       spin_lock(&sbi->work_lock);
+       if (!sbi->work_queued) {
+               delay = msecs_to_jiffies(dirty_writeback_interval * 10);
+               queue_delayed_work(system_long_wq, &sbi->sync_work, delay);
+               sbi->work_queued = 1;
+       }
+       spin_unlock(&sbi->work_lock);
 }
 
 static void hfsplus_put_super(struct super_block *sb)
 
        dprint(DBG_SUPER, "hfsplus_put_super\n");
 
+       cancel_delayed_work_sync(&sbi->sync_work);
+
        if (!(sb->s_flags & MS_RDONLY) && sbi->s_vhdr) {
                struct hfsplus_vh *vhdr = sbi->s_vhdr;
 
        .write_inode    = hfsplus_write_inode,
        .evict_inode    = hfsplus_evict_inode,
        .put_super      = hfsplus_put_super,
-       .write_super    = hfsplus_write_super,
        .sync_fs        = hfsplus_sync_fs,
        .statfs         = hfsplus_statfs,
        .remount_fs     = hfsplus_remount,
        sb->s_fs_info = sbi;
        mutex_init(&sbi->alloc_mutex);
        mutex_init(&sbi->vh_mutex);
+       spin_lock_init(&sbi->work_lock);
+       INIT_DELAYED_WORK(&sbi->sync_work, delayed_sync_fs);
        hfsplus_fill_defaults(sbi);
 
        err = -EINVAL;