mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
fs: fat: rate limit the kernel messages
If FAT formatted SD card gets removed without unmounting, FAT file system may throw many kernel error messages which could too much traffic for console driver and can sometimes even cause the system to trigger watchdog timeout. This patch converts the printk to printk_ratelimited to rate limit the error messages from FAT fs. Change-Id: I58b942f6714a8d3353478eb21139b8046ee3f875 Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> (cherry picked from commit a872b71069d717ced1a2de642afa0693d1bb9448)
This commit is contained in:
parent
390bd8ddc9
commit
f7ba1eb0da
1 changed files with 5 additions and 1 deletions
|
@ -56,7 +56,11 @@ void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...)
|
|||
va_start(args, fmt);
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
printk("%sFAT-fs (%s): %pV\n", level, sb->s_id, &vaf);
|
||||
if (!strncmp(level, KERN_ERR, sizeof(KERN_ERR)))
|
||||
printk_ratelimited("%sFAT-fs (%s): %pV\n", level,
|
||||
sb->s_id, &vaf);
|
||||
else
|
||||
printk("%sFAT-fs (%s): %pV\n", level, sb->s_id, &vaf);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue