diff options
Diffstat (limited to 'fs/fat/misc.c')
-rw-r--r-- | fs/fat/misc.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/fs/fat/misc.c b/fs/fat/misc.c index d3da05f26465..1fa23f6ffba5 100644 --- a/fs/fat/misc.c +++ b/fs/fat/misc.c | |||
@@ -20,27 +20,29 @@ | |||
20 | * In case the file system is remounted read-only, it can be made writable | 20 | * In case the file system is remounted read-only, it can be made writable |
21 | * again by remounting it. | 21 | * again by remounting it. |
22 | */ | 22 | */ |
23 | void fat_fs_error(struct super_block *s, const char *fmt, ...) | 23 | void __fat_fs_error(struct super_block *s, int report, const char *fmt, ...) |
24 | { | 24 | { |
25 | struct fat_mount_options *opts = &MSDOS_SB(s)->options; | 25 | struct fat_mount_options *opts = &MSDOS_SB(s)->options; |
26 | va_list args; | 26 | va_list args; |
27 | 27 | ||
28 | printk(KERN_ERR "FAT: Filesystem error (dev %s)\n", s->s_id); | 28 | if (report) { |
29 | printk(KERN_ERR "FAT: Filesystem error (dev %s)\n", s->s_id); | ||
29 | 30 | ||
30 | printk(KERN_ERR " "); | 31 | printk(KERN_ERR " "); |
31 | va_start(args, fmt); | 32 | va_start(args, fmt); |
32 | vprintk(fmt, args); | 33 | vprintk(fmt, args); |
33 | va_end(args); | 34 | va_end(args); |
34 | printk("\n"); | 35 | printk("\n"); |
36 | } | ||
35 | 37 | ||
36 | if (opts->errors == FAT_ERRORS_PANIC) | 38 | if (opts->errors == FAT_ERRORS_PANIC) |
37 | panic(" FAT fs panic from previous error\n"); | 39 | panic("FAT: fs panic from previous error\n"); |
38 | else if (opts->errors == FAT_ERRORS_RO && !(s->s_flags & MS_RDONLY)) { | 40 | else if (opts->errors == FAT_ERRORS_RO && !(s->s_flags & MS_RDONLY)) { |
39 | s->s_flags |= MS_RDONLY; | 41 | s->s_flags |= MS_RDONLY; |
40 | printk(KERN_ERR " File system has been set read-only\n"); | 42 | printk(KERN_ERR "FAT: Filesystem has been set read-only\n"); |
41 | } | 43 | } |
42 | } | 44 | } |
43 | EXPORT_SYMBOL_GPL(fat_fs_error); | 45 | EXPORT_SYMBOL_GPL(__fat_fs_error); |
44 | 46 | ||
45 | /* Flushes the number of free clusters on FAT32 */ | 47 | /* Flushes the number of free clusters on FAT32 */ |
46 | /* XXX: Need to write one per FSINFO block. Currently only writes 1 */ | 48 | /* XXX: Need to write one per FSINFO block. Currently only writes 1 */ |