Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79f33d4e authored by Asutosh Das's avatar Asutosh Das
Browse files

fat: limit the number of error prints



Use fat_fs_error_ratelimit instead of fat_fs_error so as to
avoid large number of prints.

CRs-Fixed: 619824
Change-Id: I458df6c2c7a53c0902f2b388b5992007b719cb86
Signed-off-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
parent 219364c5
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -388,10 +388,14 @@ static inline unsigned long fat_dir_hash(int logstart)
/* fat/misc.c */
extern __printf(3, 4) __cold
void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...);
#define fat_fs_error(sb, fmt, args...)		\
	__fat_fs_error(sb, 1, fmt , ## args)
#define fat_fs_error_ratelimit(sb, fmt, args...) \
	__fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args)
/*
 * If removable devices with a fat fs are removed without a unmount, further
 * accesses to the device by applications causes a large number of error prints
 * & in some cases leads to watchdog bark.
 */
#define fat_fs_error(sb, fmt, args...)	fat_fs_error_ratelimit(sb, fmt, ## args)
__printf(3, 4) __cold
void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...);
#define fat_msg_ratelimit(sb, level, fmt, args...)	\