Commit 7675bad0 authored by Hirofumi Ogawa's avatar Hirofumi Ogawa Committed by Linus Torvalds

[PATCH] fat: use vprintk instead of snprintf with static buffer

Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c0d26a41
...@@ -15,26 +15,22 @@ ...@@ -15,26 +15,22 @@
* fat_fs_panic reports a severe file system problem and sets the file system * fat_fs_panic reports a severe file system problem and sets the file system
* read-only. The file system can be made writable again by remounting it. * read-only. The file system can be made writable again by remounting it.
*/ */
static char panic_msg[512];
void fat_fs_panic(struct super_block *s, const char *fmt, ...) void fat_fs_panic(struct super_block *s, const char *fmt, ...)
{ {
int not_ro;
va_list args; va_list args;
va_start (args, fmt); printk(KERN_ERR "FAT: Filesystem panic (dev %s)\n", s->s_id);
vsnprintf (panic_msg, sizeof(panic_msg), fmt, args);
va_end (args);
not_ro = !(s->s_flags & MS_RDONLY); printk(KERN_ERR " ");
if (not_ro) va_start(args, fmt);
s->s_flags |= MS_RDONLY; vprintk(fmt, args);
va_end(args);
printk("\n");
printk(KERN_ERR "FAT: Filesystem panic (dev %s)\n" if (!(s->s_flags & MS_RDONLY)) {
" %s\n", s->s_id, panic_msg); s->s_flags |= MS_RDONLY;
if (not_ro)
printk(KERN_ERR " File system has been set read-only\n"); printk(KERN_ERR " File system has been set read-only\n");
}
} }
void lock_fat(struct super_block *sb) void lock_fat(struct super_block *sb)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment