diff options
author | Namjae Jeon <linkinjeon@gmail.com> | 2012-05-31 19:26:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-31 20:49:28 -0400 |
commit | b742c341539fc8b8386ef72f0e95758f39fbb4c8 (patch) | |
tree | ce074fbb28923b08904823128ec0167d9df266da /fs/fat | |
parent | 78491189ddb6d84d4a4abae992ed891a236d0263 (diff) |
fat: add fat_msg_ratelimit()
Add a fat_msg_ratelimit() to limit the message generation rate.
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fat')
-rw-r--r-- | fs/fat/fat.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/fat/fat.h b/fs/fat/fat.h index 951d12b61b58..fc35c5c69136 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h | |||
@@ -335,6 +335,11 @@ void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...); | |||
335 | __fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args) | 335 | __fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args) |
336 | __printf(3, 4) __cold | 336 | __printf(3, 4) __cold |
337 | void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...); | 337 | void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...); |
338 | #define fat_msg_ratelimit(sb, level, fmt, args...) \ | ||
339 | do { \ | ||
340 | if (__ratelimit(&MSDOS_SB(sb)->ratelimit)) \ | ||
341 | fat_msg(sb, level, fmt, ## args); \ | ||
342 | } while (0) | ||
338 | extern int fat_clusters_flush(struct super_block *sb); | 343 | extern int fat_clusters_flush(struct super_block *sb); |
339 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); | 344 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); |
340 | extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts, | 345 | extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts, |