mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-29 17:36:55 +00:00
scoutfs: add scoutfs_bug_on()
Add a BUG_ON() wrapper that identifies the file system via the super block and prints the condition and some additional formatted output. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -15,4 +15,12 @@ void __printf(4, 5) scoutfs_msg(struct super_block *sb, const char *prefix,
|
||||
#define scoutfs_info(sb, fmt, args...) \
|
||||
scoutfs_msg(sb, KERN_INFO, "", fmt, ##args)
|
||||
|
||||
#define scoutfs_bug_on(sb, cond, fmt, args...) \
|
||||
do { \
|
||||
if (cond) { \
|
||||
scoutfs_err(sb, "(" __stringify(cond) "), " fmt, ##args); \
|
||||
BUG(); \
|
||||
} \
|
||||
} while (0) \
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user