summaryrefslogtreecommitdiffstats
path: root/fs/fat/misc.c
diff options
context:
space:
mode:
authorLinus Torvalds2009-09-30 18:31:14 +0200
committerLinus Torvalds2009-09-30 18:31:14 +0200
commit4c8f1cb266cba4d1052f524d04df839d8f732ace (patch)
tree4bf2e6bcc56dcce2c919bca969f6626c8f18b7e6 /fs/fat/misc.c
parentMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafa... (diff)
parentfat: Check s_dirt in fat_sync_fs() (diff)
downloadkernel-qcow2-linux-4c8f1cb266cba4d1052f524d04df839d8f732ace.tar.gz
kernel-qcow2-linux-4c8f1cb266cba4d1052f524d04df839d8f732ace.tar.xz
kernel-qcow2-linux-4c8f1cb266cba4d1052f524d04df839d8f732ace.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6: fat: Check s_dirt in fat_sync_fs() vfat: change the default from shortname=lower to shortname=mixed fat/nls: Fix handling of utf8 invalid char
Diffstat (limited to 'fs/fat/misc.c')
-rw-r--r--fs/fat/misc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/fat/misc.c b/fs/fat/misc.c
index 4e35be873e09..0f55f5cb732f 100644
--- a/fs/fat/misc.c
+++ b/fs/fat/misc.c
@@ -43,19 +43,19 @@ EXPORT_SYMBOL_GPL(fat_fs_error);
/* Flushes the number of free clusters on FAT32 */
/* XXX: Need to write one per FSINFO block. Currently only writes 1 */
-void fat_clusters_flush(struct super_block *sb)
+int fat_clusters_flush(struct super_block *sb)
{
struct msdos_sb_info *sbi = MSDOS_SB(sb);
struct buffer_head *bh;
struct fat_boot_fsinfo *fsinfo;
if (sbi->fat_bits != 32)
- return;
+ return 0;
bh = sb_bread(sb, sbi->fsinfo_sector);
if (bh == NULL) {
printk(KERN_ERR "FAT: bread failed in fat_clusters_flush\n");
- return;
+ return -EIO;
}
fsinfo = (struct fat_boot_fsinfo *)bh->b_data;
@@ -74,6 +74,8 @@ void fat_clusters_flush(struct super_block *sb)
mark_buffer_dirty(bh);
}
brelse(bh);
+
+ return 0;
}
/*