diff options
Diffstat (limited to 'fs/fat/cache.c')
-rw-r--r-- | fs/fat/cache.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/fat/cache.c b/fs/fat/cache.c index 113f0a1e565d..ae8200f84e39 100644 --- a/fs/fat/cache.c +++ b/fs/fat/cache.c | |||
@@ -242,9 +242,10 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus) | |||
242 | while (*fclus < cluster) { | 242 | while (*fclus < cluster) { |
243 | /* prevent the infinite loop of cluster chain */ | 243 | /* prevent the infinite loop of cluster chain */ |
244 | if (*fclus > limit) { | 244 | if (*fclus > limit) { |
245 | fat_fs_error(sb, "%s: detected the cluster chain loop" | 245 | fat_fs_error_ratelimit(sb, |
246 | " (i_pos %lld)", __func__, | 246 | "%s: detected the cluster chain loop" |
247 | MSDOS_I(inode)->i_pos); | 247 | " (i_pos %lld)", __func__, |
248 | MSDOS_I(inode)->i_pos); | ||
248 | nr = -EIO; | 249 | nr = -EIO; |
249 | goto out; | 250 | goto out; |
250 | } | 251 | } |
@@ -253,9 +254,9 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus) | |||
253 | if (nr < 0) | 254 | if (nr < 0) |
254 | goto out; | 255 | goto out; |
255 | else if (nr == FAT_ENT_FREE) { | 256 | else if (nr == FAT_ENT_FREE) { |
256 | fat_fs_error(sb, "%s: invalid cluster chain" | 257 | fat_fs_error_ratelimit(sb, "%s: invalid cluster chain" |
257 | " (i_pos %lld)", __func__, | 258 | " (i_pos %lld)", __func__, |
258 | MSDOS_I(inode)->i_pos); | 259 | MSDOS_I(inode)->i_pos); |
259 | nr = -EIO; | 260 | nr = -EIO; |
260 | goto out; | 261 | goto out; |
261 | } else if (nr == FAT_ENT_EOF) { | 262 | } else if (nr == FAT_ENT_EOF) { |