|
6 | 6 | #include <linux/nls.h> |
7 | 7 | #include <linux/fs.h> |
8 | 8 | #include <linux/mutex.h> |
| 9 | +#include <linux/ratelimit.h> |
9 | 10 | #include <linux/msdos_fs.h> |
10 | 11 |
|
11 | 12 | /* |
@@ -82,6 +83,8 @@ struct msdos_sb_info { |
82 | 83 | struct fatent_operations *fatent_ops; |
83 | 84 | struct inode *fat_inode; |
84 | 85 |
|
| 86 | + struct ratelimit_state ratelimit; |
| 87 | + |
85 | 88 | spinlock_t inode_hash_lock; |
86 | 89 | struct hlist_head inode_hashtable[FAT_HASH_SIZE]; |
87 | 90 | }; |
@@ -322,8 +325,13 @@ extern int fat_fill_super(struct super_block *sb, void *data, int silent, |
322 | 325 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, |
323 | 326 | struct inode *i2); |
324 | 327 | /* fat/misc.c */ |
325 | | -extern void fat_fs_error(struct super_block *s, const char *fmt, ...) |
326 | | - __attribute__ ((format (printf, 2, 3))) __cold; |
| 328 | +extern void |
| 329 | +__fat_fs_error(struct super_block *s, int report, const char *fmt, ...) |
| 330 | + __attribute__ ((format (printf, 3, 4))) __cold; |
| 331 | +#define fat_fs_error(s, fmt, args...) \ |
| 332 | + __fat_fs_error(s, 1, fmt , ## args) |
| 333 | +#define fat_fs_error_ratelimit(s, fmt, args...) \ |
| 334 | + __fat_fs_error(s, __ratelimit(&MSDOS_SB(s)->ratelimit), fmt , ## args) |
327 | 335 | extern int fat_clusters_flush(struct super_block *sb); |
328 | 336 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); |
329 | 337 | extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts, |
|
0 commit comments