fat: Fix the removal of opts->fs_dmask
[safe/jmp/linux-2.6] / fs / fat / file.c
index 9b94094..b28ea64 100644 (file)
@@ -139,6 +139,18 @@ static int fat_file_release(struct inode *inode, struct file *filp)
        return 0;
 }
 
+int fat_file_fsync(struct file *filp, struct dentry *dentry, int datasync)
+{
+       struct inode *inode = dentry->d_inode;
+       int res, err;
+
+       res = simple_fsync(filp, dentry, datasync);
+       err = sync_mapping_buffers(MSDOS_SB(inode->i_sb)->fat_inode->i_mapping);
+
+       return res ? res : err;
+}
+
+
 const struct file_operations fat_file_operations = {
        .llseek         = generic_file_llseek,
        .read           = do_sync_read,
@@ -148,7 +160,7 @@ const struct file_operations fat_file_operations = {
        .mmap           = generic_file_mmap,
        .release        = fat_file_release,
        .ioctl          = fat_generic_ioctl,
-       .fsync          = file_fsync,
+       .fsync          = fat_file_fsync,
        .splice_read    = generic_file_splice_read,
 };